public static CallingConventionSignature FromReader(MetadataImage image, IBinaryStreamReader reader)
{
var flag = reader.ReadByte();
reader.Position--;
switch ((CallingConventionAttributes)flag & SignatureTypeMask)
{
case CallingConventionAttributes.Default:
case CallingConventionAttributes.C:
case CallingConventionAttributes.ExplicitThis:
case CallingConventionAttributes.FastCall:
case CallingConventionAttributes.StdCall:
case CallingConventionAttributes.ThisCall:
case CallingConventionAttributes.VarArg:
return(MethodSignature.FromReader(image, reader));
case CallingConventionAttributes.Property:
return(PropertySignature.FromReader(image, reader));
case CallingConventionAttributes.Local:
return(LocalVariableSignature.FromReader(image, reader));
case CallingConventionAttributes.GenericInstance:
return(GenericInstanceMethodSignature.FromReader(image, reader));
case CallingConventionAttributes.Field:
return(FieldSignature.FromReader(image, reader));
}
throw new NotSupportedException();
}