本文整理汇总了C#中dnlib.DotNet.ExportedType类的典型用法代码示例。如果您正苦于以下问题:C# ExportedType类的具体用法?C# ExportedType怎么用?C# ExportedType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExportedType类属于dnlib.DotNet命名空间,在下文中一共展示了ExportedType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Namespace
/// <summary>
/// Returns the namespace 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="sb">String builder to use or null</param>
/// <returns>The namespace</returns>
public static string Namespace(ExportedType exportedType, bool isReflection, StringBuilder sb)
{
return NamespaceSB(exportedType, isReflection, sb).ToString();
}
示例2: DefinitionAssembly
/// <summary>
/// Returns the assembly where this type is defined
/// </summary>
/// <param name="exportedType">The <c>ExportedType</c></param>
/// <returns>A <see cref="IAssembly"/> or <c>null</c> if none found</returns>
public static IAssembly DefinitionAssembly(ExportedType exportedType) {
return new FullNameCreator().GetDefinitionAssembly(exportedType);
}
示例3: Scope
/// <summary>
/// Gets the scope
/// </summary>
/// <param name="exportedType">The <c>ExportedType</c></param>
/// <returns>The <see cref="IScope"/> or <c>null</c> if none found</returns>
public static IScope Scope(ExportedType exportedType) {
return new FullNameCreator().GetScope(exportedType);
}
示例4: 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>
/// <returns>The full name</returns>
public static string FullName(ExportedType exportedType, bool isReflection) {
return FullName(exportedType, isReflection, null);
}
示例5: AssemblyQualifiedName
/// <summary>
/// Returns the assembly qualified full name of a <see cref="ExportedType"/>
/// </summary>
/// <param name="exportedType">The <c>ExportedType</c></param>
/// <returns>The assembly qualified full name</returns>
public static string AssemblyQualifiedName(ExportedType exportedType) {
return AssemblyQualifiedName(exportedType, null);
}
示例6: GetScopeType
ITypeDefOrRef GetScopeType(ExportedType exportedType) {
return null;
}
示例7: GetOwnerModule
ModuleDef GetOwnerModule(ExportedType exportedType) {
if (exportedType == null)
return null;
return exportedType.Module;
}
示例8: Find
void Find(ExportedType et)
{
if (et == null)
return;
// The type might've been moved, so always resolve it instead of using DefinitionAssembly
var td = et.Resolve(assembly.ModuleDefinition);
if (td == null)
Find(et.DefinitionAssembly);
else
Find(td.DefinitionAssembly ?? et.DefinitionAssembly);
}
示例9: FindExportedType
static ExportedType FindExportedType(AssemblyDef asm, ExportedType et)
{
foreach (var mod in asm.Modules.GetSafeEnumerable()) {
foreach (var et2 in mod.ExportedTypes.GetSafeEnumerable()) {
if (new SigComparer(SigComparerOptions.DontCompareTypeScope).Equals(et, et2))
return et2;
}
}
return null;
}
示例10: 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>
/// <param name="sb">String builder to use or null</param>
/// <returns>The full name</returns>
public static string FullName(ExportedType exportedType, bool isReflection, IFullNameCreatorHelper helper, StringBuilder sb)
{
return FullNameSB(exportedType, isReflection, helper, sb).ToString();
}
示例11: FullNameSB
/// <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>
/// <param name="sb">String builder to use or null</param>
/// <returns>The full name</returns>
public static StringBuilder FullNameSB(ExportedType exportedType, bool isReflection, IFullNameCreatorHelper helper, StringBuilder sb)
{
var fnc = new FullNameCreator(isReflection, helper, sb);
fnc.CreateFullName(exportedType);
return fnc.sb ?? new StringBuilder();
}
示例12: 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();
}
示例13: AssemblyQualifiedName
/// <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 string AssemblyQualifiedName(ExportedType exportedType, IFullNameCreatorHelper helper, StringBuilder sb)
{
return AssemblyQualifiedNameSB(exportedType, helper, sb).ToString();
}
示例14: NamespaceSB
/// <summary>
/// Returns the namespace 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="sb">String builder to use or null</param>
/// <returns>The namespace</returns>
public static StringBuilder NamespaceSB(ExportedType exportedType, bool isReflection, StringBuilder sb)
{
var fnc = new FullNameCreator(isReflection, null, sb);
fnc.CreateNamespace(exportedType);
return fnc.sb ?? new StringBuilder();
}
示例15: CreateName
void CreateName(ExportedType exportedType) {
if (exportedType == null) {
sb.Append(NULLVALUE);
return;
}
AddName(exportedType.TypeName);
}