public object GetDeserializedObject(object obj, Type targetType) { ExporterTypesTests.CollectionWithoutParameterlessCtor <int> validCollection = obj as ExporterTypesTests.CollectionWithoutParameterlessCtor <int>; if (validCollection != null) { return(new ExporterTypesTests.CollectionA()); } return(obj); }
public object GetObjectToSerialize(object obj, Type targetType) { ExporterTypesTests.CollectionA collectionA = obj as ExporterTypesTests.CollectionA; if (collectionA != null) { ExporterTypesTests.CollectionWithoutParameterlessCtor <int> validCollection = new ExporterTypesTests.CollectionWithoutParameterlessCtor <int>(1); validCollection.Add(1); return(validCollection); } return(obj); }