예제 #1
0
 private EntityChanges <T> Process(StorageDescriptor sourceDescriptor, StorageDescriptor destDescriptor)
 {
     using (var source = new DataConnection(sourceDescriptor.ConnectionStringName).AddMappingSchema(sourceDescriptor.MappingSchema))
         using (var dest = new DataConnection(destDescriptor.ConnectionStringName).AddMappingSchema(destDescriptor.MappingSchema))
         {
             var accessorTypes   = TypeProvider.GetAccessorTypes(destDescriptor.MappingSchema, typeof(T));
             var completeChanges = new EntityChanges <T>(_objectReader.ReadSource(source, accessorTypes), _objectReader.ReadDest(dest), CompleteComparer);
             var changes         = new EntityChanges <T>(completeChanges.SourceOnly, completeChanges.DestOnly, IdentityComparer);
             return(changes);
         }
 }
예제 #2
0
 private static IEnumerable <TestCaseData> TestCaseDataFor(StorageDescriptor sourceDescriptor, StorageDescriptor destDescriptor)
 => TypeProvider.GetDataObjectTypes(destDescriptor.MappingSchema)
 .Where(x => !ExcludedTypes.Contains(x))
 .Select(x => new TestCaseData(x, sourceDescriptor, destDescriptor)
         .SetName(TestName(x)));
예제 #3
0
 private static IEnumerable <TestCaseData> TestCaseDataFor(StorageDescriptor sourceDescriptor, StorageDescriptor destDescriptor)
 => TypeProvider.GetDataObjectTypes(destDescriptor.MappingSchema)
 //.Where(x => x == typeof(NuClear.ValidationRules.Storage.Model.Facts.Position))
 .Select(x => new TestCaseData(x, sourceDescriptor, destDescriptor)
         .SetName($"{destDescriptor.ConnectionStringName}.{x.Name}"));