diff --git a/Remotion/Core/Reflection.CodeGeneration.TypePipe.PerformanceTests/CachePerformanceTest.cs b/Remotion/Core/Reflection.CodeGeneration.TypePipe.PerformanceTests/CachePerformanceTest.cs index 57014f6b92..38781e8722 100644 --- a/Remotion/Core/Reflection.CodeGeneration.TypePipe.PerformanceTests/CachePerformanceTest.cs +++ b/Remotion/Core/Reflection.CodeGeneration.TypePipe.PerformanceTests/CachePerformanceTest.cs @@ -65,7 +65,7 @@ public void TypePipe () SafeServiceLocator.Current.GetInstance(), SafeServiceLocator.Current.GetInstance()), new DomainObjectParticipant( - SafeServiceLocator.Current.GetInstance(), + SafeServiceLocator.Current.GetInstance(), SafeServiceLocator.Current.GetInstance()) }; var pipelineFactory = new RemotionPipelineFactory(); diff --git a/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/BindableDomainObjectTest.cs b/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/BindableDomainObjectTest.cs index ac44e6c70d..38e0aabf00 100644 --- a/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/BindableDomainObjectTest.cs +++ b/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/BindableDomainObjectTest.cs @@ -145,7 +145,7 @@ public void Reloading () [Test] public void ObjectReference () { - var classDefinition = MappingConfiguration.Current.GetTypeDefinition(typeof(SampleBindableDomainObject)); + var classDefinition = MappingConfiguration.Current.GetClassDefinition(typeof(SampleBindableDomainObject)); var instance = LifetimeService.GetObjectReference(TestableClientTransaction, new ObjectID(classDefinition, Guid.NewGuid())); var implementation = (BindableDomainObjectImplementation)PrivateInvoke.GetNonPublicField(instance, "_implementation"); @@ -222,7 +222,7 @@ public void UniqueIdentifier () [Test] public void BindableDomainObject_IsNotPartOfMapping () { - Assert.That(MappingConfiguration.Current.GetTypeDefinitions().Where(o => o.ClassType == typeof(BindableDomainObject)), Is.Empty); + Assert.That(MappingConfiguration.Current.GetTypeDefinitions().Where(o => o.Type == typeof(BindableDomainObject)), Is.Empty); } [Test] diff --git a/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/SerializableStorageSettings.cs b/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/SerializableStorageSettings.cs index 749ab96801..2f805c7026 100644 --- a/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/SerializableStorageSettings.cs +++ b/Remotion/Data/DomainObjects.ObjectBinding.UnitTests/SerializableStorageSettings.cs @@ -46,9 +46,9 @@ public IReadOnlyCollection GetStorageProviderDefiniti return _storageSettingsImplementation.GetStorageProviderDefinitions(); } - public StorageProviderDefinition GetStorageProviderDefinition (ClassDefinition classDefinition) + public StorageProviderDefinition GetStorageProviderDefinition (TypeDefinition typeDefinition) { - return _storageSettingsImplementation.GetStorageProviderDefinition(classDefinition); + return _storageSettingsImplementation.GetStorageProviderDefinition(typeDefinition); } public StorageProviderDefinition GetStorageProviderDefinition (Type storageGroupTypeOrNull) diff --git a/Remotion/Data/DomainObjects.PerformanceTests/ClassDefinitionTest.cs b/Remotion/Data/DomainObjects.PerformanceTests/ClassDefinitionTest.cs index 1d8ff8f716..7adda92452 100644 --- a/Remotion/Data/DomainObjects.PerformanceTests/ClassDefinitionTest.cs +++ b/Remotion/Data/DomainObjects.PerformanceTests/ClassDefinitionTest.cs @@ -40,7 +40,7 @@ public void GetOppositeClassDefinition () var stopwatch = new Stopwatch(); stopwatch.Start(); for (int i = 0; i < TestRepititions; i++) - found &= endPoints[i % endPoints.Count].GetOppositeEndPointDefinition().ClassDefinition != null; + found &= endPoints[i % endPoints.Count].GetOppositeEndPointDefinition().TypeDefinition != null; stopwatch.Stop(); Console.WriteLine(found); @@ -65,7 +65,7 @@ public void GetMandatoryOppositeClassDefinition () var stopwatch = new Stopwatch(); stopwatch.Start(); for (int i = 0; i < TestRepititions; i++) - found &= endPoints[i % endPoints.Count].GetOppositeEndPointDefinition().ClassDefinition != null; + found &= endPoints[i % endPoints.Count].GetOppositeEndPointDefinition().TypeDefinition != null; stopwatch.Stop(); Console.WriteLine(found); diff --git a/Remotion/Data/DomainObjects.Security.UnitTests/TestDomain/StubStorageProvider.cs b/Remotion/Data/DomainObjects.Security.UnitTests/TestDomain/StubStorageProvider.cs index af0ac4b1ac..5632888efb 100644 --- a/Remotion/Data/DomainObjects.Security.UnitTests/TestDomain/StubStorageProvider.cs +++ b/Remotion/Data/DomainObjects.Security.UnitTests/TestDomain/StubStorageProvider.cs @@ -54,7 +54,7 @@ public override IEnumerable ExecuteCollectionQuery (IQuery query) var collection = new List(); if (query.ID == GetSecurableObjectsQueryID) - collection.Add(DataContainer.CreateNew(CreateNewObjectID(MappingConfiguration.Current.GetTypeDefinition(typeof(SecurableObject))))); + collection.Add(DataContainer.CreateNew(CreateNewObjectID(MappingConfiguration.Current.GetClassDefinition(typeof(SecurableObject))))); return collection.ToArray(); } diff --git a/Remotion/Data/DomainObjects.UnitTests/ClientTransactionTest.cs b/Remotion/Data/DomainObjects.UnitTests/ClientTransactionTest.cs index 9a67320cc6..c6c914c119 100644 --- a/Remotion/Data/DomainObjects.UnitTests/ClientTransactionTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/ClientTransactionTest.cs @@ -562,10 +562,10 @@ public void IsInvalid () [Test] public void NewObject () { - var typeDefinition = GetTypeDefinition(typeof(Order)); + var classDefinition = GetClassDefinition(typeof(Order)); var constructorParameters = ParamList.Create(_fakeDomainObject1); _objectLifetimeAgentMock - .Setup(mock => mock.NewObject(typeDefinition, constructorParameters)) + .Setup(mock => mock.NewObject(classDefinition, constructorParameters)) .Returns(_fakeDomainObject1) .Verifiable(); diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/DataContainerTest.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/DataContainerTest.cs index 2cfcf3e78f..ad890cace7 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/DataContainerTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/DataContainerTest.cs @@ -1664,7 +1664,7 @@ public void SetDataFromSubTransaction_SetsChangedFlag_IfChanged_WithPersistentPr public void SetDataFromSubTransaction_SetsChangedFlag_IfChanged_WithNonPersistentProperty () { var sourceDataContainer = DataContainer.CreateForExisting( - new ObjectID(_nonPersistentPropertyOnPersistentDataContainer.ClassDefinition, Guid.NewGuid()), + new ObjectID((ClassDefinition)_nonPersistentPropertyOnPersistentDataContainer.TypeDefinition, Guid.NewGuid()), null, propertyDefinition => propertyDefinition.DefaultValue); sourceDataContainer.SetValue(_nonPersistentPropertyOnPersistentDataContainer, 42); diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/PropertyValueTest.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/PropertyValueTest.cs index aceed80b67..b04e8643af 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/PropertyValueTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/PropertyValueTest.cs @@ -84,13 +84,13 @@ public void AreValuesDifferent_True () [Test] public void PropertyValue_WithReferenceType_NotAllowed () { - var classDefinition = ClassDefinitionObjectMother.CreateClassDefinition("ClassName"); - PropertyDefinition propertyDefinition = PropertyDefinitionObjectMother.CreateForFakePropertyInfo(classDefinition, "test", typeof(List)); + var typeDefinition = TypeDefinitionObjectMother.CreateClassDefinition("ClassName"); + PropertyDefinition propertyDefinition = PropertyDefinitionObjectMother.CreateForFakePropertyInfo(typeDefinition, "test", typeof(List)); Assert.That( () => new PropertyValue(propertyDefinition, null), Throws.InstanceOf() .With.Message.EqualTo( - @"The property 'test' (declared on class 'ClassName') is invalid because its values cannot be copied. " + @"The property 'test' (declared on type 'Remotion.Data.DomainObjects.UnitTests.Mapping.TestDomain.Integration.Order') is invalid because its values cannot be copied. " + @"Only value types, strings, the Type type, byte arrays, types implementing IStructuralEquatable, and ObjectIDs are currently supported, " + @"but the property's type is 'System.Collections.Generic.List`1[[" + typeof(object).AssemblyQualifiedName + "]]'.")); } diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/SynchronizedRealObjectEndPointSyncStateTest.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/SynchronizedRealObjectEndPointSyncStateTest.cs index 3486c6905d..06c7b0b38b 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/SynchronizedRealObjectEndPointSyncStateTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/SynchronizedRealObjectEndPointSyncStateTest.cs @@ -303,9 +303,9 @@ public void FlattenedSerializable () Assert.That(result.TransactionEventSink, Is.Not.Null); } - private IRelationEndPointDefinition GetRelationEndPointDefinition (Type classType, string shortPropertyName) + private IRelationEndPointDefinition GetRelationEndPointDefinition (Type type, string shortPropertyName) { - return Configuration.GetTypeDefinition(classType).GetRelationEndPointDefinition(classType.FullName + "." + shortPropertyName); + return Configuration.GetTypeDefinition(type).GetRelationEndPointDefinition(type.FullName + "." + shortPropertyName); } private Action GetOppositeObjectIDSetter (ObjectEndPointSetCommand command) diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/UnsynchronizedRealObjectEndPointSyncStateTest.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/UnsynchronizedRealObjectEndPointSyncStateTest.cs index 9c2e7a405c..bb1dea055e 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/UnsynchronizedRealObjectEndPointSyncStateTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RealObjectEndPoints/UnsynchronizedRealObjectEndPointSyncStateTest.cs @@ -101,9 +101,9 @@ public void FlattenedSerializable () Assert.That(result, Is.Not.Null); } - private IRelationEndPointDefinition GetRelationEndPointDefinition (Type classType, string shortPropertyName) + private IRelationEndPointDefinition GetRelationEndPointDefinition (Type declaringType, string shortPropertyName) { - return Configuration.GetTypeDefinition(classType).GetRelationEndPointDefinition(classType.FullName + "." + shortPropertyName); + return Configuration.GetTypeDefinition(declaringType).GetRelationEndPointDefinition(declaringType.FullName + "." + shortPropertyName); } } } diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointIDTest.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointIDTest.cs index 35cd526cb5..94135a1962 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointIDTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointIDTest.cs @@ -94,7 +94,7 @@ public void Create_WithPropertyIdentifier_InvalidPropertyName () Assert.That( () => RelationEndPointID.Create(DomainObjectIDs.Order1, "PropertyName"), Throws.ArgumentException - .With.ArgumentExceptionMessageEqualTo("No relation found for class 'Order' and property 'PropertyName'.", "propertyIdentifier")); + .With.ArgumentExceptionMessageEqualTo("No relation found for type 'Remotion.Data.DomainObjects.UnitTests.TestDomain.Order' and property 'PropertyName'.", "propertyIdentifier")); } [Test] diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointObjectMother.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointObjectMother.cs index 100cfe07f2..206dfc9f85 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointObjectMother.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RelationEndPointObjectMother.cs @@ -110,7 +110,7 @@ public static RelationEndPointID CreateRelationEndPointID (ObjectID objectID = n { objectID = objectID ?? new ObjectID(typeof(Order), Guid.NewGuid()); shortPropertyName = shortPropertyName ?? "OrderItems"; - return RelationEndPointID.Create(objectID, objectID.ClassDefinition.ClassType, shortPropertyName); + return RelationEndPointID.Create(objectID, objectID.ClassDefinition.Type, shortPropertyName); } public static RelationEndPointID CreateAnonymousEndPointID () diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RootRelationEndPointRegistrationAgentTest.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RootRelationEndPointRegistrationAgentTest.cs index 03eedc4525..f834991985 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RootRelationEndPointRegistrationAgentTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/RootRelationEndPointRegistrationAgentTest.cs @@ -152,7 +152,7 @@ public void Serialization () private Mock CreateRealObjectEndPointMock (ObjectID originatingObjectID, string shortPropertyName, ObjectID oppositeObjectID) { var endPointMock = new Mock(MockBehavior.Strict); - var relationEndPointID = RelationEndPointID.Create(originatingObjectID, originatingObjectID.ClassDefinition.ClassType, shortPropertyName); + var relationEndPointID = RelationEndPointID.Create(originatingObjectID, originatingObjectID.ClassDefinition.Type, shortPropertyName); endPointMock.Setup(stub => stub.ID).Returns(relationEndPointID); endPointMock.Setup(stub => stub.Definition).Returns(relationEndPointID.Definition); endPointMock.Setup(stub => stub.OriginalOppositeObjectID).Returns(oppositeObjectID); diff --git a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/VirtualEndPoints/CollectionEndPoints/DomainObjectCollectionEndPointCollectionProviderTest.cs b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/VirtualEndPoints/CollectionEndPoints/DomainObjectCollectionEndPointCollectionProviderTest.cs index b4d5ef1998..5881ebe31e 100644 --- a/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/VirtualEndPoints/CollectionEndPoints/DomainObjectCollectionEndPointCollectionProviderTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/DataManagement/RelationEndPoints/VirtualEndPoints/CollectionEndPoints/DomainObjectCollectionEndPointCollectionProviderTest.cs @@ -75,7 +75,7 @@ public void GetCollection () [Test] public void GetCollection_CollectionWithWrongCtor () { - var classDefinition = GetTypeDefinition(typeof(DomainObjectWithCollectionMissingCtor)); + var classDefinition = GetClassDefinition(typeof(DomainObjectWithCollectionMissingCtor)); var relationEndPointDefinition = GetEndPointDefinition(typeof(DomainObjectWithCollectionMissingCtor), "OppositeObjects"); var endPointID = RelationEndPointID.Create(new ObjectID(classDefinition, Guid.NewGuid()), relationEndPointDefinition); diff --git a/Remotion/Data/DomainObjects.UnitTests/Database/TestDomainDBScriptGenerationTest.cs b/Remotion/Data/DomainObjects.UnitTests/Database/TestDomainDBScriptGenerationTest.cs index 45dd7acc8b..ebfe9557fe 100644 --- a/Remotion/Data/DomainObjects.UnitTests/Database/TestDomainDBScriptGenerationTest.cs +++ b/Remotion/Data/DomainObjects.UnitTests/Database/TestDomainDBScriptGenerationTest.cs @@ -70,7 +70,7 @@ private IEnumerable