Esempio n. 1
0
 /// <summary>
 /// Do we need to add CopyFrom/Clone methods to the given type?
 /// </summary>
 private static bool NeedsSemanticMethods(TypeDefinition type)
 {
     if (!type.IsValueType || type.IsPrimitive || type.IsEnum)
         return false;
     if (type.IsNullableT() || type.IsVoid())
         return false;
     return true;
 }
Esempio n. 2
0
 /// <summary>
 /// Do we need to add CopyFrom/Clone methods to the given type?
 /// </summary>
 public static bool IsNonNullableStruct(TypeDefinition type)
 {
     if (!type.IsValueType || type.IsPrimitive || type.IsEnum)
         return false;
     if (type.IsNullableT() || type.IsVoid())
         return false;
     return true;
 }