Example #1
0
        public static TypeKey ToGenericType(this TypeKey key, IEnumerable <TypeKey> typeArguments)
        {
            var name = key.Name + "<" + string.Join(",", typeArguments.Select(a => a.Namespace + "." + a.Name)) + ">";

            return(new TypeKey(key.Namespace, name));
        }
Example #2
0
 public static TypeKey ToModifiedType(this TypeKey key, TypeKey modifier)
 {
     return(new TypeKey(key.Namespace, $"{modifier.Namespace}.{modifier.Name} {key.Name}"));
 }
Example #3
0
 public static TypeKey ToPinnedType(this TypeKey key)
 {
     return(new TypeKey(key.Namespace, key.Name + " pinned"));
 }
Example #4
0
 public static TypeKey ToReferenceType(this TypeKey key)
 {
     return(new TypeKey(key.Namespace, key.Name + "&"));
 }
Example #5
0
 public static TypeKey ToPointerType(this TypeKey key)
 {
     return(new TypeKey(key.Namespace, key.Name + "*"));
 }
Example #6
0
 public static TypeKey ToArrayType(this TypeKey key)
 {
     return(new TypeKey(key.Namespace, key.Name + "[]"));
 }