public MetadataNameFormat Clone() { MetadataNameFormat result = (MetadataNameFormat)MemberwiseClone(); result.IsReadOnly = false; return(result); }
static MetadataNameFormat CreateDefault() { var result = new MetadataNameFormat(false); result.MakeReadOnly(); return(result); }
public string ToString(MetadataNameFormat format) { if (format == null) { return(ToString()); } return(format.Format(null, this, null)); }
internal override string Accept(MetadataNameFormat formatter, string format, IFormatProvider provider) { if (IsReturnParameter) { throw new NotImplementedException(); } return(formatter.FormatParameter(format, this, provider)); }
protected internal override string FormatGenericInstanceType(string format, GenericInstanceTypeName name, IFormatProvider formatProvider) { string nameWithoutMangle = Regex.Replace(name.ElementType.FullName, @"`\d", string.Empty); MetadataNameFormat options = this.GetFormatHelper(formatProvider); StringBuilder sb = new StringBuilder(nameWithoutMangle); options.PrintGenericArgs(sb, name.GenericArguments); return(sb.ToString()); }
public MetadataNameFormat(MetadataNameFormat options) { if (options == null) { options = MetadataNameFormat.Default; } DefaultFormatString.CopyBuffer(options.DefaultFormatString); _includeAttributes = options.IncludeAttributes.Clone(); _includeModifiers = options.IncludeModifiers.Clone(); _includeReturnTypes = options.IncludeReturnTypes.Clone(); _includeTypeConstraints = options.IncludeTypeConstraints; _includeTypeParameters = options.IncludeTypeParameters; _includeVariance = options.IncludeVariance; }
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)); } }
internal override string Accept(MetadataNameFormat formatter, string format, IFormatProvider provider) { return(formatter.FormatGenericInstanceType(format, this, provider)); }
internal override string Accept(MetadataNameFormat formatter, string format, IFormatProvider provider) { return(formatter.FormatAssembly(format, this, provider)); }
internal abstract string Accept(MetadataNameFormat formatter, string format, IFormatProvider provider);
internal sealed override string Accept(MetadataNameFormat formatter, string format, IFormatProvider provider) { return(formatter.FormatGenericParameter(format, this, provider)); }
internal override string Accept(MetadataNameFormat formatter, string format, IFormatProvider provider) { return(formatter.FormatFunctionPointerType(format, this, provider)); }