Mono.CSharp.TypeInfo.GetTypeInfo C# (CSharp) Method

GetTypeInfo() public static method

public static GetTypeInfo ( System.TypeSpec type, IMemberContext context ) : TypeInfo
type System.TypeSpec
context IMemberContext
return TypeInfo
		public static TypeInfo GetTypeInfo (TypeSpec type, IMemberContext context)
		{
			if (!type.IsStruct)
				return simple_type;

			TypeInfo info;
			if (type_hash.TryGetValue (type, out info))
				return info;

			var struct_info = StructInfo.GetStructInfo (type, context);
			if (struct_info != null) {
				info = new TypeInfo (struct_info, 0);
			} else {
				info = simple_type;
			}

			type_hash.Add (type, info);
			return info;
		}

Usage Example

Example #1
0
        private VariableInfo(string name, TypeSpec type, int offset)
        {
            this.Name     = name;
            this.Offset   = offset;
            this.TypeInfo = TypeInfo.GetTypeInfo(type);

            Length = TypeInfo.TotalLength;

            Initialize();
        }
All Usage Examples Of Mono.CSharp.TypeInfo::GetTypeInfo