本文整理汇总了C#中System.Language.FormatPropertyName方法的典型用法代码示例。如果您正苦于以下问题:C# Language.FormatPropertyName方法的具体用法?C# Language.FormatPropertyName怎么用?C# Language.FormatPropertyName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Language
的用法示例。
在下文中一共展示了Language.FormatPropertyName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public static ITextOutput Write(ITextOutput output, PropertyDef property, Language language, bool? isIndexer = null) {
language.FormatPropertyName(output, property, isIndexer);
output.WriteSpace();
output.Write(':', TextTokenType.Operator);
output.WriteSpace();
language.TypeToString(output, property.PropertySig.GetRetType().ToTypeDefOrRef(), false, property);
property.MDToken.WriteSuffixString(output);
return output;
}
示例2: GetText
public static object GetText(PropertyDefinition property, Language language, bool? isIndexer = null)
{
return HighlightSearchMatch(language.FormatPropertyName(property, isIndexer), " : " + language.TypeToString(property.PropertyType, false, property));
}
示例3: GetText
public static object GetText(PropertyDefinition property, Language language, bool? isIndexer = null)
{
string name = language.FormatPropertyName(property, isIndexer);
var b = new System.Text.StringBuilder();
if (property.HasParameters)
{
b.Append('(');
for (int i = 0; i < property.Parameters.Count; i++)
{
if (i > 0)
b.Append(", ");
b.Append(language.TypeToString(property.Parameters[i].ParameterType, false, property.Parameters[i]));
}
var method = property.GetMethod ?? property.SetMethod;
if (method.CallingConvention == MethodCallingConvention.VarArg)
{
if (property.HasParameters)
b.Append(", ");
b.Append("...");
}
b.Append(") : ");
}
else
{
b.Append(" : ");
}
b.Append(language.TypeToString(property.PropertyType, false, property));
b.Append(property.MetadataToken.ToSuffixString());
return HighlightSearchMatch(name, b.ToString());
}
示例4: GetText
public static object GetText(PropertyDefinition property, Language language, bool? isIndexer = null)
{
var propertyName = language.FormatPropertyName(property, isIndexer);
var propertyType = language.TypeToString(property.PropertyType, false, property);
return HighlightSearchMatch(UnicodeSupport.FormatUnicodeIdentifier(propertyName), " : " + UnicodeSupport.FormatUnicodeIdentifier(propertyType));
}
示例5: GetText
public static object GetText(PropertyDef property, Language language, bool? isIndexer = null)
{
return HighlightSearchMatch(language.FormatPropertyName(property, isIndexer), " : " + language.TypeToString(property.PropertySig.RetType.ResolveGenericParams(property.DeclaringType).ToTypeDefOrRef(), false, property));
}