public void SetUp() { _serializableFieldFinderMock = MockRepository.GenerateStrictMock <ISerializableFieldFinder>(); _enabler = new ProxySerializationEnabler(_serializableFieldFinderMock); _someProxy = MutableTypeObjectMother.Create(typeof(SomeType)); _serializableProxy = MutableTypeObjectMother.Create(typeof(SomeType), attributes: TypeAttributes.Serializable); _serializableInterfaceProxy = MutableTypeObjectMother.Create(typeof(SerializableInterfaceType), copyCtorsFromBase: true); _deserializationCallbackProxy = MutableTypeObjectMother.Create(typeof(DeserializationCallbackType)); _serializableInterfaceWithDeserializationCallbackProxy = MutableTypeObjectMother.Create(baseType: typeof(SerializableWithDeserializationCallbackType), attributes: TypeAttributes.Serializable); _someInitializationMethod = ReflectionObjectMother.GetSomeInstanceMethod(); }
public ProxySerializationEnabler(ISerializableFieldFinder serializableFieldFinder) { ArgumentUtility.CheckNotNull("serializableFieldFinder", serializableFieldFinder); _serializableFieldFinder = serializableFieldFinder; }