本文整理汇总了C#中dnlib.DotNet.FullNameCreator类的典型用法代码示例。如果您正苦于以下问题:C# FullNameCreator类的具体用法?C# FullNameCreator怎么用?C# FullNameCreator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FullNameCreator类属于dnlib.DotNet命名空间,在下文中一共展示了FullNameCreator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EventFullName
/// <summary>
/// Returns the full name of a property
/// </summary>
/// <param name="declaringType">Declaring type full name or <c>null</c> if none</param>
/// <param name="name">Name of property</param>
/// <param name="typeDefOrRef">Event type</param>
/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
/// <returns>Property full name</returns>
public static string EventFullName(string declaringType, UTF8String name, ITypeDefOrRef typeDefOrRef, IList<TypeSig> typeGenArgs) {
var fnc = new FullNameCreator(false, null);
if (typeGenArgs != null) {
fnc.genericArguments = new GenericArguments();
fnc.genericArguments.PushTypeArgs(typeGenArgs);
}
fnc.CreateEventFullName(declaringType, name, typeDefOrRef);
return fnc.Result;
}
示例2: NamespaceSB
/// <summary>
/// Returns the namespace of a <see cref="TypeSig"/>
/// </summary>
/// <param name="typeSig">The type sig</param>
/// <param name="isReflection">Set if output should be compatible with reflection</param>
/// <param name="sb">String builder to use or null</param>
/// <returns>The namespace</returns>
public static StringBuilder NamespaceSB(TypeSig typeSig, bool isReflection, StringBuilder sb)
{
var fnc = new FullNameCreator(isReflection, null, sb);
fnc.CreateNamespace(typeSig);
return fnc.sb ?? new StringBuilder();
}
示例3: PropertyFullName
/// <summary>
/// Returns the full name of a property
/// </summary>
/// <param name="declaringType">Declaring type full name or <c>null</c> if none</param>
/// <param name="name">Name of property</param>
/// <param name="propertySig">Property signature</param>
/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
/// <returns>Property full name</returns>
public static string PropertyFullName(string declaringType, UTF8String name, CallingConventionSig propertySig, IList<TypeSig> typeGenArgs) {
var fnc = new FullNameCreator(false, null);
if (typeGenArgs != null) {
fnc.genericArguments = new GenericArguments();
fnc.genericArguments.PushTypeArgs(typeGenArgs);
}
fnc.CreatePropertyFullName(declaringType, name, propertySig);
return fnc.Result;
}
示例4: AssemblyQualifiedName
/// <summary>
/// Returns the assembly qualified full name of a <see cref="TypeSig"/>
/// </summary>
/// <param name="typeSig">The <c>TypeSig</c></param>
/// <param name="helper">Helps print the name</param>
/// <returns>The assembly qualified full name</returns>
public static string AssemblyQualifiedName(TypeSig typeSig, IFullNameCreatorHelper helper) {
var fnc = new FullNameCreator(true, helper);
fnc.CreateAssemblyQualifiedName(typeSig);
return fnc.Result;
}
示例5: FullName
/// <summary>
/// Returns the full name of a <see cref="ExportedType"/>
/// </summary>
/// <param name="exportedType">The <c>ExportedType</c></param>
/// <param name="isReflection">Set if output should be compatible with reflection</param>
/// <param name="helper">Helps print the name</param>
/// <returns>The full name</returns>
public static string FullName(ExportedType exportedType, bool isReflection, IFullNameCreatorHelper helper) {
var fnc = new FullNameCreator(isReflection, helper);
fnc.CreateFullName(exportedType);
return fnc.Result;
}
示例6: Namespace
/// <summary>
/// Returns the namespace of a <see cref="TypeDef"/>
/// </summary>
/// <param name="typeDef">The <c>TypeDef</c></param>
/// <param name="isReflection">Set if output should be compatible with reflection</param>
/// <returns>The namespace</returns>
public static string Namespace(TypeDef typeDef, bool isReflection) {
var fnc = new FullNameCreator(isReflection, null);
fnc.CreateNamespace(typeDef);
return fnc.Result;
}
示例7: Name
/// <summary>
/// Returns the name of a <see cref="TypeSig"/>
/// </summary>
/// <param name="typeSig">The type sig</param>
/// <param name="isReflection">Set if output should be compatible with reflection</param>
/// <returns>The name</returns>
public static string Name(TypeSig typeSig, bool isReflection) {
var fnc = new FullNameCreator(isReflection, null);
fnc.CreateName(typeSig);
return fnc.Result;
}
示例8: FullNameSB
/// <summary>
/// Returns the full name of a <see cref="TypeSpec"/>
/// </summary>
/// <param name="typeSpec">The <c>TypeSpec</c></param>
/// <param name="isReflection">Set if output should be compatible with reflection</param>
/// <param name="helper">Helps print the name</param>
/// <param name="sb">String builder to use or null</param>
/// <returns>The full name</returns>
public static StringBuilder FullNameSB(TypeSpec typeSpec, bool isReflection, IFullNameCreatorHelper helper, StringBuilder sb)
{
var fnc = new FullNameCreator(isReflection, helper, sb);
fnc.CreateFullName(typeSpec);
return fnc.sb ?? new StringBuilder();
}
示例9: EventFullNameSB
/// <summary>
/// Returns the full name of a property
/// </summary>
/// <param name="declaringType">Declaring type full name or <c>null</c> if none</param>
/// <param name="name">Name of property</param>
/// <param name="typeDefOrRef">Event type</param>
/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
/// <param name="sb">String builder to use or null</param>
/// <returns>Property full name</returns>
public static StringBuilder EventFullNameSB(string declaringType, UTF8String name, ITypeDefOrRef typeDefOrRef, IList<TypeSig> typeGenArgs, StringBuilder sb)
{
var fnc = new FullNameCreator(false, null, sb);
if (typeGenArgs != null) {
fnc.genericArguments = new GenericArguments();
fnc.genericArguments.PushTypeArgs(typeGenArgs);
}
fnc.CreateEventFullName(declaringType, name, typeDefOrRef);
return fnc.sb ?? new StringBuilder();
}
示例10: FieldFullNameSB
/// <summary>
/// Returns the full name of a field
/// </summary>
/// <param name="declaringType">Declaring type full name or <c>null</c> if none</param>
/// <param name="name">Name of field</param>
/// <param name="fieldSig">Field signature</param>
/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
/// <param name="sb">String builder to use or null</param>
/// <returns>Field full name</returns>
public static StringBuilder FieldFullNameSB(string declaringType, string name, FieldSig fieldSig, IList<TypeSig> typeGenArgs, StringBuilder sb)
{
var fnc = new FullNameCreator(false, null, sb);
if (typeGenArgs != null) {
fnc.genericArguments = new GenericArguments();
fnc.genericArguments.PushTypeArgs(typeGenArgs);
}
fnc.CreateFieldFullName(declaringType, name, fieldSig);
return fnc.sb ?? new StringBuilder();
}
示例11: AssemblyQualifiedNameSB
/// <summary>
/// Returns the assembly qualified full name of a <see cref="ExportedType"/>
/// </summary>
/// <param name="exportedType">The <c>ExportedType</c></param>
/// <param name="helper">Helps print the name</param>
/// <param name="sb">String builder to use or null</param>
/// <returns>The assembly qualified full name</returns>
public static StringBuilder AssemblyQualifiedNameSB(ExportedType exportedType, IFullNameCreatorHelper helper, StringBuilder sb)
{
var fnc = new FullNameCreator(true, helper, sb);
fnc.CreateAssemblyQualifiedName(exportedType);
return fnc.sb ?? new StringBuilder();
}
示例12: FieldFullName
/// <summary>
/// Returns the full name of a field
/// </summary>
/// <param name="declaringType">Declaring type full name or <c>null</c> if none</param>
/// <param name="name">Name of field</param>
/// <param name="fieldSig">Field signature</param>
/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
/// <returns>Field full name</returns>
public static string FieldFullName(string declaringType, string name, FieldSig fieldSig, IList<TypeSig> typeGenArgs) {
var fnc = new FullNameCreator(false, null);
if (typeGenArgs != null) {
fnc.genericArguments = new GenericArguments();
fnc.genericArguments.PushTypeArgs(typeGenArgs);
}
fnc.CreateFieldFullName(declaringType, name, fieldSig);
return fnc.Result;
}
示例13: MethodFullName
/// <summary>
/// Returns the full name of a method
/// </summary>
/// <param name="declaringType">Declaring type full name or <c>null</c> if none</param>
/// <param name="name">Name of method or <c>null</c> if none</param>
/// <param name="methodSig">Method signature</param>
/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
/// <param name="methodGenArgs">Method generic arguments or <c>null</c> if none</param>
/// <returns>Method full name</returns>
public static string MethodFullName(string declaringType, string name, MethodSig methodSig, IList<TypeSig> typeGenArgs, IList<TypeSig> methodGenArgs) {
var fnc = new FullNameCreator(false, null);
if (typeGenArgs != null || methodGenArgs != null)
fnc.genericArguments = new GenericArguments();
if (typeGenArgs != null)
fnc.genericArguments.PushTypeArgs(typeGenArgs);
if (methodGenArgs != null)
fnc.genericArguments.PushMethodArgs(methodGenArgs);
fnc.CreateMethodFullName(declaringType, name, methodSig);
return fnc.Result;
}
示例14: MethodBaseSigFullNameSB
/// <summary>
/// Returns the full name of a property sig
/// </summary>
/// <param name="sig">Property sig</param>
/// <param name="sb">String builder to use or null</param>
/// <returns>Property sig full name</returns>
public static StringBuilder MethodBaseSigFullNameSB(MethodBaseSig sig, StringBuilder sb)
{
var fnc = new FullNameCreator(false, null, sb);
fnc.CreateMethodFullName(null, null, sig, null);
return fnc.sb ?? new StringBuilder();
}
示例15: MethodBaseSigFullName
/// <summary>
/// Returns the full name of a sig
/// </summary>
/// <param name="declType">Declaring type or null</param>
/// <param name="name">Name or null</param>
/// <param name="sig">Method sig</param>
/// <param name="gppMethod">Owner method or null</param>
/// <returns>Sig full name</returns>
public static string MethodBaseSigFullName(string declType, string name, MethodBaseSig sig, MethodDef gppMethod) {
var fnc = new FullNameCreator(false, null);
fnc.CreateMethodFullName(declType, name, sig, gppMethod);
return fnc.Result;
}