public static string StandardTests() { var o = new ExistingTestObject(); ExistingTestObject.ExistingStaticMethod(o).AssertUnequal(null); ExistingTestObject.ExistingStaticProperty.AssertEqual(null); ExistingTestObject.ExistingStaticProperty = new ExistingTestObject(); ExistingTestObject.ExistingStaticProperty.AssertUnequal(null); ExistingTestObject.ExistingStaticField.AssertEqual(null); ExistingTestObject.ExistingStaticField = new ExistingTestObject(); ExistingTestObject.ExistingStaticField.AssertUnequal(null); o.ExistingInstanceMethod(new ExistingTestObject()).AssertUnequal(null); o.ExistingInstanceField.AssertEqual(null); o.ExistingInstanceField = new ExistingTestObject(); o.ExistingInstanceField.AssertUnequal(null); o.ExistingInstanceProperty_NoSet.AssertEqual(null); var asModified = (Mod_ExistingTestObject)o; asModified.ExistingInstanceProperty_NoSet = new ExistingTestObject(); o.ExistingInstanceProperty_NoSet.AssertUnequal(null); asModified.NewInstanceProperty.AssertEqual(null); asModified.NewInstanceProperty = new ExistingTestObject(); asModified.AssertUnequal(null); asModified.NewInstanceMethod().AssertUnequal(null); asModified.NewInstanceField.AssertEqual(null); asModified.NewInstanceField = new ExistingTestObject(); asModified.NewInstanceField.AssertUnequal(null); var newObject = new New_NewTestObject(); newObject.InstanceMethod(new New_NewTestObject()).AssertUnequal(null); New_NewTestObject.StaticMethod(newObject).AssertUnequal(null); newObject.InstanceField.AssertEqual(null); newObject.InstanceField = new New_NewTestObject(); newObject.InstanceField.AssertUnequal(null); New_NewTestObject.StaticField.AssertEqual(null); New_NewTestObject.StaticField = new New_NewTestObject(); New_NewTestObject.StaticField.AssertUnequal(null); newObject.InstanceMethod2().AssertUnequal(null); newObject.ExistingGenericInstanceMethod <int, long>(100).AssertEqual(0); o.ExistingGenericInstanceMethod <Type, int>(typeof(int)).AssertEqual(0); asModified.NewGenericInstanceMethod <int, long>(0).AssertEqual(0); return("Success"); }
public static new ExistingTestObject ExistingStaticMethod(ExistingTestObject o) { return(new ExistingTestObject()); }
public new ExistingTestObject ExistingInstanceMethod(ExistingTestObject o) { return(new ExistingTestObject()); }
public static ExistingTestObject ExistingStaticMethod(ExistingTestObject o) { return(null); }
public virtual ExistingTestObject ExistingInstanceMethod(ExistingTestObject o) { return(null); }