internal static CallingConventions GetReflectionCallingConvention(Microsoft.MetadataReader.CorCallingConvention callConvention) { CallingConventions callingConvention = (CallingConventions)0; if ((callConvention & Microsoft.MetadataReader.CorCallingConvention.Mask) == Microsoft.MetadataReader.CorCallingConvention.HasThis) { callingConvention = callingConvention | CallingConventions.HasThis; } else if ((callConvention & Microsoft.MetadataReader.CorCallingConvention.Mask) == Microsoft.MetadataReader.CorCallingConvention.ExplicitThis) { callingConvention = callingConvention | CallingConventions.ExplicitThis; } callingConvention = (!SignatureUtil.IsVarArg(callConvention) ? callingConvention | CallingConventions.Standard : callingConvention | CallingConventions.VarArgs); return(callingConvention); }