ResxDiffLib.Operations.CopyValues C# (CSharp) Method

CopyValues() public static method

Copies values from one document to another
public static CopyValues ( IEnumerable keys, ResxDocument from, ResxDocument to ) : void
keys IEnumerable The names of the keys whose values should be copied
from ResxDocument The document to copy from
to ResxDocument The document to copy to
return void
        public static void CopyValues(IEnumerable<string> keys, ResxDocument from, ResxDocument to)
        {
            to.Data.Where(data => keys.Contains(data.Name)).ToList()
                .ForEach(aData => aData.Value = from.Data.First(bData => bData.Name == aData.Name).Value);
        }