Mono.Cecil.MetadataSystem.TryGetPrimitiveData C# (CSharp) Method

TryGetPrimitiveData() static private method

static private TryGetPrimitiveData ( TypeReference type, bool>.Row &primitive_data ) : bool
type TypeReference
primitive_data bool>.Row
return bool
		static bool TryGetPrimitiveData (TypeReference type, out Row<ElementType, bool> primitive_data)
		{
			if (primitive_value_types == null)
				InitializePrimitives ();

			return primitive_value_types.TryGetValue (type.Name, out primitive_data);
		}

Usage Example

Exemplo n.º 1
0
        public static bool TryGetPrimitiveElementType(TypeDefinition type, out ElementType etype)
        {
            Row <ElementType, bool> row;

            etype = ElementType.None;
            if (type.Namespace != "System")
            {
                return(false);
            }
            if (!MetadataSystem.TryGetPrimitiveData(type, out row) || !((ElementType)row.Col1).IsPrimitive())
            {
                return(false);
            }
            etype = row.Col1;
            return(true);
        }
All Usage Examples Of Mono.Cecil.MetadataSystem::TryGetPrimitiveData