Пример #1
0
        private static string ComputeMethodDeclName(BasicFormat f,
                                                    MethodName name,
                                                    MetadataNameFormat formatProvider)
        {
            switch (f)
            {
            case BasicFormat.Compact:
                return(CompactFormat.FormatMethod(null, name, formatProvider));

            case BasicFormat.Name:
                return(name.Name);

            case BasicFormat.NameOverloads:
                return(NameOverloadsFormat.FormatMethod(null, name, formatProvider));

            case BasicFormat.Full:
                return(FullNameFormat.FormatMethod(null, name, formatProvider));

            case BasicFormat.Roundtrip:
            default:
                return(RoundtrippableFormat.FormatMethod(null, name, formatProvider));
            }
        }
Пример #2
0
 internal override string Accept(MetadataNameFormat formatter, string format, IFormatProvider provider)
 {
     return(formatter.FormatMethod(format, this, provider));
 }