本文整理汇总了C#中IMetadataTokenProvider.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# IMetadataTokenProvider.ToString方法的具体用法?C# IMetadataTokenProvider.ToString怎么用?C# IMetadataTokenProvider.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMetadataTokenProvider
的用法示例。
在下文中一共展示了IMetadataTokenProvider.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveMethod
private void ResolveMethod (IMetadataTokenProvider method)
{
HashSet<string> rules;
string m = method.ToString ();
m = m.Substring (m.IndexOf (' ') + 1);
if (targets.TryGetValue (m, out rules))
Add (method, rules);
}
示例2: CreateTargetDetails
void CreateTargetDetails (IMetadataTokenProvider target)
{
AssemblyDefinition assembly = target.GetAssembly ();
writer.WriteAttributeString ("Name", target.ToString ());
writer.WriteAttributeString ("Assembly", assembly == null ? AssemblySet : assembly.Name.FullName);
}
示例3: CreateImporter
/// <summary>
/// Creates the suitable importer for the givem member
/// </summary>
/// <param name="member"></param>
/// <returns></returns>
public MemberImporter CreateImporter(IMetadataTokenProvider member)
{
//Switches the token type
switch (member.MetadataToken.TokenType)
{
case TokenType.TypeDef:
return new TypeImporter(member, Destination, this);
case TokenType.Field:
return new FieldImporter(member, Destination, this);
case TokenType.Method:
return new MethodImporter(member, Destination, this);
case TokenType.Property:
return new PropertyImporter(member, Destination, this);
case TokenType.Event:
return new EventImporter(member, Destination, this);
default:
throw new ArgumentException("Cannot create an importer for " + member.ToString());
}
}