Here are the examples of the csharp api System.Type.GetTypeReference() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : TypeHelper.cs
with MIT License
from SharpNative
with MIT License
from SharpNative
public static TypeReference GetBasicTypeFromTypeRef(TypeRef typeRef)
{
Type type = null;
if (typeRef == Int8)
type = typeof(byte);
else if (typeRef == Int16)
type = typeof(short);
else if (typeRef == Int32)
type = typeof(int);
else if (typeRef == Int64)
type = typeof(long);
else if (typeRef == String)
type = typeof(string);
else if (typeRef == Float)
type = typeof(float);
else if (typeRef == Double)
type = typeof(double);
else if (typeRef == Boolean)
type = typeof(bool);
else
throw new InvalidOperationException("Could not get basic type from typeref: " + typeRef);
return type.GetTypeReference();
}