Example #1
0
 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;
 }
Example #2
0
 // 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;
     }
 }
Example #3
0
 // 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;
 }
Example #4
0
 // 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;
 }
Example #5
0
 public static void TestGenericMethod <T>(GenericClassBase <T> test)
     where T : class
 {
     test.Value = 1;
 }
Example #6
0
 // 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;
 }