public StringBuilder WriteComplexType(InsType type, StringBuilder builder)
            {
                type.Apply(this, builder);

                var assembly = type.Apply(AssemblyLocator.Instance, builder);

                if (assembly != null)
                {
                    builder.Append(", ");
                    WriteAssembly(assembly, builder);
                }

                return(builder);
            }
        public static StringBuilder Write(StringBuilder builder, InsType type)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            return(Writer.Instance.WriteComplexType(type, builder));
        }
            InsType ParseArrayDetails(ref int index, InsType elementType)
            {
                index++;

                if (TryReadChar(ref index, ']'))
                {
                    return(new InsSZArrayType(elementType));
                }

                var rank = 1;

                ParseArrayRank(ref index);

                while (TryReadChar(ref index, ','))
                {
                    rank++;
                    ParseArrayRank(ref index);
                }

                ReadChar(ref index, ']');
                return(new InsArrayType(elementType, rank));
            }
Beispiel #4
0
 internal InsSZArrayType(InsType elementType)
     : base(elementType)
 {
 }
 private protected InsElementedType(InsType elementType)
 {
     ElementType = elementType ?? throw new ArgumentNullException(nameof(elementType));
 }
Beispiel #6
0
 internal InsByRefType(InsType elementType)
     : base(elementType)
 {
 }
Beispiel #7
0
 internal InsArrayType(InsType elementType, int rank)
     : base(elementType)
 {
     Rank = rank;
 }
 public static string Format(InsType type) => Write(BuilderPool.Rent(), type).ToStringAndReturn();
Beispiel #9
0
 internal InsPointerType(InsType elementType)
     : base(elementType)
 {
 }
 public static InsArrayType ArrayType(InsType elementType, int rank)
 => new InsArrayType(elementType, rank);
 public static InsSZArrayType SZArrayType(InsType elementType)
 => new InsSZArrayType(elementType);
 public static InsPointerType PointerType(InsType elementType)
 => new InsPointerType(elementType);
 public static InsByRefType ByRefType(InsType elementType)
 => new InsByRefType(elementType);