private void CheckGuids() { Message("Starting Guid Check"); GuidComparison g = new GuidComparison(); var results = g.Compare(WorkingCopyBaseline, WorkingCopyDelta); //update working copies as we go with those still yet to resolve WorkingCopyBaseline.Clear(); WorkingCopyDelta.Clear(); foreach (var item in results.Where(x => x.Value == ChangeType.Matched)) { Message(String.Format("Found a Match for type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } foreach (var item in results.Where(x => x.Value == ChangeType.Added)) { WorkingCopyDelta.Add(item.Key); Message(String.Format("Found a new item of type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } foreach (var item in results.Where(x => x.Value == ChangeType.Deleted)) { WorkingCopyBaseline.Add(item.Key); Message(String.Format("Found a missing item of type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } foreach (var item in results.Where(x => x.Value == ChangeType.Unknown)) { WorkingCopyBaseline.Add(item.Key); Message(String.Format("Found duplicate possibilities for item of type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } var m = g.GetMap(); foreach (var key in m) { EntityMapping[key.Key] = m[key.Key]; } Message("Guid Check - Complete"); }
private void CheckGuids() { Message("Starting Guid Check"); GuidComparison g = new GuidComparison(); var results = g.Compare(WorkingCopyBaseline, WorkingCopyDelta); //update working copies as we go with those still yet to resolve WorkingCopyBaseline.Clear(); WorkingCopyDelta.Clear(); foreach (var item in results.Where(x => x.Value == ChangeType.Matched)) { Message(String.Format("Found a Match for type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } foreach (var item in results.Where(x => x.Value == ChangeType.Added)) { WorkingCopyDelta.Add(item.Key); Message(String.Format("Found a new item of type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } foreach (var item in results.Where(x => x.Value == ChangeType.Deleted)) { WorkingCopyBaseline.Add(item.Key); Message(String.Format("Found a missing item of type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } foreach (var item in results.Where(x => x.Value == ChangeType.Unknown)) { WorkingCopyBaseline.Add(item.Key); Message(String.Format("Found duplicate possibilities for item of type {1} with GUID: {0}", item.Key.GlobalId, item.Key.GetType().ToString())); EntityLabelChanges[item.Key] = item.Value; } var m = g.GetMap(); foreach (var key in m) { EntityMapping[key.Key] = m[key.Key]; } Message("Guid Check - Complete"); }