public static void TestMultipleGenericParamsMethod2 <T, K>(GenericClassBase <K> singleGeneric, MultipleGenericClassBase <T, K> doubleGeneric) where T : class where K : class { singleGeneric.Value = 1; doubleGeneric.Value = 1; }
// Used in test to verify generic binding when null defaults are used public static void TestGenericMethodWithNullDefault <T>(GenericClassBase <T> test, Object testObj = null) where T : class { if (testObj == null) { test.Value = 10; } else { test.Value = 20; } }
// Used in test to verify generic binding when defaults are used public static void TestGenericMethodWithDefault <T>(GenericClassBase <T> test, int value = 25) where T : class { test.Value = value; }
// Used in test to verify generic binding when converted PyTypes are involved (timedelta -> TimeSpan) public static void TestGenericMethod <T>(GenericClassBase <T> test, TimeSpan span) where T : class { test.Value = span.Hours; }
public static void TestGenericMethod <T>(GenericClassBase <T> test) where T : class { test.Value = 1; }
// Used to test that when a generic option is available but the parameter is already typed it doesn't // match to the wrong one. This is an example of a typed generic parameter public static void TestGenericMethod(GenericClassBase <ReferenceClass3> test) { test.Value = 15; }