C# Class Catel.Fody.CecilExtensions

Show file Open project: Catel/Catel.Fody

Public Methods

Method Description
Constructor ( this typeDefinition, bool isStatic ) : Mono.Cecil.MethodDefinition
ContainsAttribute ( this attributes, string attributeName ) : bool
FindConstructor ( this typeReference, List types ) : MethodReference
FindType ( this moduleDefinition, string assemblyName, string typeName ) : Mono.Cecil.TypeDefinition
GetAllTypeDefinitions ( this moduleDefinition ) : List
GetAttribute ( Collection customAttributes, string attributeName ) : CustomAttribute
GetAttribute ( this typeDefinition, string attributeName ) : CustomAttribute
GetAttribute ( this attributes, string attributeName ) : CustomAttribute
GetAttributes ( Collection customAttributes, string attributeName ) : IEnumerable
GetAttributes ( this typeDefinition, string attributeName ) : IEnumerable
GetBaseTypes ( this type, bool includeIfaces ) : IEnumerable
GetFirstSequencePoint ( this method ) : SequencePoint
GetFullName ( this member ) : string
GetGeneric ( this definition ) : FieldReference
GetGeneric ( this reference ) : MethodReference
GetMethod ( this module, string methodName ) : MethodReference
GetMethodAndImport ( this module, string methodName ) : MethodReference
GetMethodReference ( this methodDefinition, Stack typeDefinitions ) : MethodReference
GetName ( this propertyDefinition ) : string
GetNullableValueType ( this typeReference ) : TypeReference
GetProperty ( this typeReference, string propertyName ) : PropertyReference
Import ( this typeReference, bool checkForNullableValueTypes = false ) : TypeReference
IsBoxingRequired ( this typeReference, TypeReference expectedType ) : bool
IsCall ( this opCode ) : bool
IsDecoratedWithAttribute ( Collection customAttributes, string attributeName ) : bool
IsDecoratedWithAttribute ( this typeDefinition, string attributeName ) : bool
IsMarkedAsGeneratedCode ( this type ) : bool
IsNullableValueType ( this typeReference ) : bool
MakeGeneric ( this field, TypeReference declaringType ) : FieldReference
MakeGeneric ( this method, TypeReference declaringType ) : MethodReference
MakeGenericIfRequired ( this typeReference ) : TypeReference
MakeHostInstanceGeneric ( this self ) : MethodReference
MarkAsCompilerGenerated ( this type, MsCoreReferenceFinder msCoreReferenceFinder ) : void
RemoveAttribute ( Collection customAttributes, string attributeName ) : void
RemoveAttribute ( this typeDefinition, string attributeName ) : void
ResolveAssembly ( this moduleDefinition, string assemblyName ) : AssemblyDefinition

Private Methods

Method Description
BuildIFaces ( Mono.Cecil.TypeDefinition type, TypeReference>.IDictionary genericArgsMap ) : IEnumerable
ContainsAttribute ( Collection customAttributes, string attributeTypeName ) : bool
CreateDebuggerNonUserCodeAttribute ( MsCoreReferenceFinder msCoreReferenceFinder, Mono.Cecil.ModuleDefinition importingModule ) : CustomAttribute
CreateGeneratedCodeAttribute ( MsCoreReferenceFinder msCoreReferenceFinder, Mono.Cecil.ModuleDefinition importingModule ) : CustomAttribute
GetGenericArgsMap ( TypeReference type, TypeReference>.IDictionary superTypeMap, IList mappedFromSuperType ) : TypeReference>.IDictionary
GetTypes ( IEnumerable typeDefinitions, List definitions ) : void
IsMarkedAsGeneratedCodeInternal ( object obj ) : bool
MarkAsGeneratedCodeInternal ( object obj, MsCoreReferenceFinder msCoreReferenceFinder ) : void
MarkAsGeneratedCodeInternal ( this customAttributes, MsCoreReferenceFinder msCoreReferenceFinder, Mono.Cecil.ModuleDefinition importingModule ) : void

Method Details

Constructor() public static method

public static Constructor ( this typeDefinition, bool isStatic ) : Mono.Cecil.MethodDefinition
typeDefinition this
isStatic bool
return Mono.Cecil.MethodDefinition

ContainsAttribute() public static method

public static ContainsAttribute ( this attributes, string attributeName ) : bool
attributes this
attributeName string
return bool

FindConstructor() public static method

public static FindConstructor ( this typeReference, List types ) : MethodReference
typeReference this
types List
return Mono.Cecil.MethodReference

FindType() public static method

public static FindType ( this moduleDefinition, string assemblyName, string typeName ) : Mono.Cecil.TypeDefinition
moduleDefinition this
assemblyName string
typeName string
return Mono.Cecil.TypeDefinition

GetAllTypeDefinitions() public static method

public static GetAllTypeDefinitions ( this moduleDefinition ) : List
moduleDefinition this
return List

GetAttribute() public static method

public static GetAttribute ( Collection customAttributes, string attributeName ) : CustomAttribute
customAttributes Collection
attributeName string
return Mono.Cecil.CustomAttribute

GetAttribute() public static method

public static GetAttribute ( this typeDefinition, string attributeName ) : CustomAttribute
typeDefinition this
attributeName string
return Mono.Cecil.CustomAttribute

GetAttribute() public static method

public static GetAttribute ( this attributes, string attributeName ) : CustomAttribute
attributes this
attributeName string
return Mono.Cecil.CustomAttribute

GetAttributes() public static method

public static GetAttributes ( Collection customAttributes, string attributeName ) : IEnumerable
customAttributes Collection
attributeName string
return IEnumerable

GetAttributes() public static method

public static GetAttributes ( this typeDefinition, string attributeName ) : IEnumerable
typeDefinition this
attributeName string
return IEnumerable

GetBaseTypes() public static method

public static GetBaseTypes ( this type, bool includeIfaces ) : IEnumerable
type this
includeIfaces bool
return IEnumerable

GetFirstSequencePoint() public static method

public static GetFirstSequencePoint ( this method ) : SequencePoint
method this
return SequencePoint

GetFullName() public static method

public static GetFullName ( this member ) : string
member this
return string

GetGeneric() public static method

public static GetGeneric ( this definition ) : FieldReference
definition this
return Mono.Cecil.FieldReference

GetGeneric() public static method

public static GetGeneric ( this reference ) : MethodReference
reference this
return Mono.Cecil.MethodReference

GetMethod() public static method

public static GetMethod ( this module, string methodName ) : MethodReference
module this
methodName string
return Mono.Cecil.MethodReference

GetMethodAndImport() public static method

public static GetMethodAndImport ( this module, string methodName ) : MethodReference
module this
methodName string
return Mono.Cecil.MethodReference

GetMethodReference() public static method

public static GetMethodReference ( this methodDefinition, Stack typeDefinitions ) : MethodReference
methodDefinition this
typeDefinitions Stack
return Mono.Cecil.MethodReference

GetName() public static method

public static GetName ( this propertyDefinition ) : string
propertyDefinition this
return string

GetNullableValueType() public static method

public static GetNullableValueType ( this typeReference ) : TypeReference
typeReference this
return Mono.Cecil.TypeReference

GetProperty() public static method

public static GetProperty ( this typeReference, string propertyName ) : PropertyReference
typeReference this
propertyName string
return Mono.Cecil.PropertyReference

Import() public static method

public static Import ( this typeReference, bool checkForNullableValueTypes = false ) : TypeReference
typeReference this
checkForNullableValueTypes bool
return Mono.Cecil.TypeReference

IsBoxingRequired() public static method

public static IsBoxingRequired ( this typeReference, TypeReference expectedType ) : bool
typeReference this
expectedType Mono.Cecil.TypeReference
return bool

IsCall() public static method

public static IsCall ( this opCode ) : bool
opCode this
return bool

IsDecoratedWithAttribute() public static method

public static IsDecoratedWithAttribute ( Collection customAttributes, string attributeName ) : bool
customAttributes Collection
attributeName string
return bool

IsDecoratedWithAttribute() public static method

public static IsDecoratedWithAttribute ( this typeDefinition, string attributeName ) : bool
typeDefinition this
attributeName string
return bool

IsMarkedAsGeneratedCode() public static method

public static IsMarkedAsGeneratedCode ( this type ) : bool
type this
return bool

IsNullableValueType() public static method

public static IsNullableValueType ( this typeReference ) : bool
typeReference this
return bool

MakeGeneric() public static method

public static MakeGeneric ( this field, TypeReference declaringType ) : FieldReference
field this
declaringType Mono.Cecil.TypeReference
return Mono.Cecil.FieldReference

MakeGeneric() public static method

public static MakeGeneric ( this method, TypeReference declaringType ) : MethodReference
method this
declaringType Mono.Cecil.TypeReference
return Mono.Cecil.MethodReference

MakeGenericIfRequired() public static method

public static MakeGenericIfRequired ( this typeReference ) : TypeReference
typeReference this
return Mono.Cecil.TypeReference

MakeHostInstanceGeneric() public static method

public static MakeHostInstanceGeneric ( this self ) : MethodReference
self this
return Mono.Cecil.MethodReference

MarkAsCompilerGenerated() public static method

public static MarkAsCompilerGenerated ( this type, MsCoreReferenceFinder msCoreReferenceFinder ) : void
type this
msCoreReferenceFinder MsCoreReferenceFinder
return void

RemoveAttribute() public static method

public static RemoveAttribute ( Collection customAttributes, string attributeName ) : void
customAttributes Collection
attributeName string
return void

RemoveAttribute() public static method

public static RemoveAttribute ( this typeDefinition, string attributeName ) : void
typeDefinition this
attributeName string
return void

ResolveAssembly() public static method

public static ResolveAssembly ( this moduleDefinition, string assemblyName ) : AssemblyDefinition
moduleDefinition this
assemblyName string
return Mono.Cecil.AssemblyDefinition