本文整理汇总了C#中dnlib.DotNet.ExportedType类的典型用法代码示例。如果您正苦于以下问题:C# ExportedType类的具体用法?C# ExportedType怎么用?C# ExportedType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExportedType类属于dnlib.DotNet命名空间,在下文中一共展示了ExportedType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:n017,项目名称:dnlib,代码行数:11,代码来源:FullNameCreator.cs
示例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);
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:8,代码来源:FullNameCreator.cs
示例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);
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:8,代码来源:FullNameCreator.cs
示例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);
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:9,代码来源:FullNameCreator.cs
示例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);
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:8,代码来源:FullNameCreator.cs
示例6: GetScopeType
ITypeDefOrRef GetScopeType(ExportedType exportedType) {
return null;
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:3,代码来源:FullNameCreator.cs
示例7: GetOwnerModule
ModuleDef GetOwnerModule(ExportedType exportedType) {
if (exportedType == null)
return null;
return exportedType.Module;
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:5,代码来源:FullNameCreator.cs
示例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);
}
开发者ID:se7ensoft,项目名称:dnSpy,代码行数:11,代码来源:CSharpLanguage.cs
示例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;
}
开发者ID:n017,项目名称:dnlib,代码行数:10,代码来源:ExportedType.cs
示例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();
}
开发者ID:n017,项目名称:dnlib,代码行数:12,代码来源:FullNameCreator.cs
示例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();
}
开发者ID:n017,项目名称:dnlib,代码行数:14,代码来源:FullNameCreator.cs
示例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();
}
开发者ID:n017,项目名称:dnlib,代码行数:13,代码来源:FullNameCreator.cs
示例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();
}
开发者ID:n017,项目名称:dnlib,代码行数:11,代码来源:FullNameCreator.cs
示例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();
}
开发者ID:n017,项目名称:dnlib,代码行数:13,代码来源:FullNameCreator.cs
示例15: CreateName
void CreateName(ExportedType exportedType) {
if (exportedType == null) {
sb.Append(NULLVALUE);
return;
}
AddName(exportedType.TypeName);
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:7,代码来源:FullNameCreator.cs
示例16: Resolve
static TypeDef Resolve(ModuleDef sourceModule, ExportedType et)
{
for (int i = 0; i < MAX_LOOP_ITERS; i++) {
if (et == null || et.module == null)
break;
var resolver = et.module.Context.AssemblyResolver;
var etAsm = resolver.Resolve(et.DefinitionAssembly, sourceModule ?? et.module);
if (etAsm == null)
break;
var td = etAsm.Find(et.FullName, false);
if (td != null)
return td;
et = FindExportedType(etAsm, et);
}
return null;
}
开发者ID:n017,项目名称:dnlib,代码行数:19,代码来源:ExportedType.cs
示例17: GetDefinitionAssembly
IAssembly GetDefinitionAssembly(ExportedType exportedType) {
if (exportedType == null)
return null;
if (!recursionCounter.Increment())
return null;
IAssembly result;
ExportedType et;
AssemblyRef asmRef;
var scope = exportedType.Implementation;
if ((et = scope as ExportedType) != null)
result = GetDefinitionAssembly(et);
else if ((asmRef = scope as AssemblyRef) != null)
result = asmRef;
else if (scope is FileDef) {
var ownerModule = GetOwnerModule(exportedType);
result = ownerModule == null ? null : ownerModule.Assembly;
}
else
result = null;
recursionCounter.Decrement();
return result;
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:24,代码来源:FullNameCreator.cs
示例18: GetTextTokenType
public static TextTokenKind GetTextTokenType(ExportedType et)
{
if (et == null)
return TextTokenKind.Text;
return GetTextTokenType(et.ToTypeRef());
}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:7,代码来源:TextTokenKind.cs
示例19: GetScope
IScope GetScope(ExportedType exportedType) {
if (exportedType == null)
return null;
if (!recursionCounter.Increment())
return null;
IScope result;
ExportedType et;
AssemblyRef asmRef;
FileDef file;
var scope = exportedType.Implementation;
if ((et = scope as ExportedType) != null)
result = GetScope(et);
else if ((asmRef = scope as AssemblyRef) != null)
result = asmRef;
else if ((file = scope as FileDef) != null) {
var ownerModule = GetOwnerModule(exportedType);
//TODO: Not all modules' names are equal to the name in FileDef.Name
var modRef = new ModuleRefUser(ownerModule, file.Name);
if (ownerModule != null)
ownerModule.UpdateRowId(modRef);
result = modRef;
}
else
result = null;
recursionCounter.Decrement();
return result;
}
开发者ID:GodLesZ,项目名称:ConfuserDeobfuscator,代码行数:29,代码来源:FullNameCreator.cs
示例20: ContainsGenericParameter
/// <summary>
/// Checks whether <paramref name="type"/> contains a <see cref="GenericVar"/> or a
/// <see cref="GenericMVar"/>.
/// </summary>
/// <param name="type">Type</param>
/// <returns><c>true</c> if <paramref name="type"/> contains a <see cref="GenericVar"/> or a
/// <see cref="GenericMVar"/>.</returns>
public static bool ContainsGenericParameter(ExportedType type) {
return new TypeHelper().ContainsGenericParameterInternal(type);
}
开发者ID:EmilZhou,项目名称:dnlib,代码行数:10,代码来源:TypeHelper.cs
注:本文中的dnlib.DotNet.ExportedType类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论