C# Class Microsoft.Cci.IMetadataReaderHostContract

Inheritance: IMetadataReaderHost
Exibir arquivo Open project: visualmutator/visualmutator

Public Methods

Method Description
FindAssembly ( Microsoft.Cci.AssemblyIdentity assemblyIdentity ) : IAssembly
FindModule ( Microsoft.Cci.ModuleIdentity moduleIdentity ) : IModule
FindUnit ( Microsoft.Cci.UnitIdentity unitIdentity ) : IUnit
GuessUnderlyingTypeSizeOfUnresolvableReferenceToEnum ( ITypeReference reference ) : byte

Returns a guess of the size of the underlying type of the given type reference to an enum type, which is assumed to be unresolvable because it is defined an assembly that is not loaded into this host. Successive calls to the method will cycle through these values with a periodicity determined by the number of types in the game and the successful guesses made in earlier games.

LoadAssembly ( Microsoft.Cci.AssemblyIdentity assemblyIdentity ) : IAssembly
LoadModule ( Microsoft.Cci.ModuleIdentity moduleIdentity ) : IModule
LoadUnit ( Microsoft.Cci.UnitIdentity unitIdentity ) : IUnit
LoadUnitFrom ( string location ) : IUnit
OpenBinaryDocument ( IBinaryDocument sourceDocument ) : IBinaryDocumentMemoryBlock

Open the binary document as a memory block in host dependent fashion.

OpenBinaryDocument ( IBinaryDocument parentSourceDocument, string childDocumentName ) : IBinaryDocumentMemoryBlock

Open the child binary document within the context of parent source document.as a memory block in host dependent fashion For example: in multimodule assemblies the main module will be parentSourceDocument, where as other modules will be child docuements.

ProbeAssemblyReference ( IUnit referringUnit, Microsoft.Cci.AssemblyIdentity referencedAssembly ) : Microsoft.Cci.AssemblyIdentity
ProbeModuleReference ( IUnit referringUnit, Microsoft.Cci.ModuleIdentity referencedModule ) : Microsoft.Cci.ModuleIdentity
Redirect ( IUnit referringUnit, IEnumerable assemblyReferences ) : IEnumerable

Provides the host with an opportunity to add, remove or substitute assembly references in the given list. This avoids the cost of rewriting the entire unit in order to make such changes.

Redirect ( IUnit referringUnit, INamedTypeReference typeReference ) : INamedTypeReference

Provides the host with an opportunity to substitute one type reference for another during metadata reading. This avoids the cost of rewriting the entire unit in order to make such changes.

ReportError ( IErrorMessage error ) : void
ReportErrors ( ErrorEventArgs errorEventArguments ) : void
ResolvingAssemblyReference ( IUnit referringUnit, Microsoft.Cci.AssemblyIdentity referencedAssembly ) : void

This method is called when the assembly reference is being resolved and its not already loaded by the host.

ResolvingModuleReference ( IUnit referringUnit, Microsoft.Cci.ModuleIdentity referencedModule ) : void

This method is called when the module reference is being resolved and its not already loaded by the host.

Rewrite ( IUnit containingUnit, ICustomAttribute customAttribute ) : ICustomAttribute

Provides the host with an opportunity to substitute a custom attribute with another during metadata reading. This avoids the cost of rewriting the entire unit in order to make such changes.

Rewrite ( IUnit containingUnit, IMethodDefinition methodDefinition ) : IMethodDefinition

Provides the host with an opportunity to substitute one method definition for another during metadata reading. This avoids the cost of rewriting the entire unit in order to make such changes.

StartGuessingGame ( ) : void

Called by the metadata reader when it is about to start parsing a custom attribute blob.

TryNextPermutation ( ) : bool

Called by the metadata reader when it has unsucessfully tried to parse a custom attribute blob and it now needs to try a new permutation. Returns false if no more perumations are possible.

UnifyAssembly ( Microsoft.Cci.AssemblyIdentity assemblyIdentity ) : Microsoft.Cci.AssemblyIdentity
UnifyAssembly ( IAssemblyReference assemblyReference ) : Microsoft.Cci.AssemblyIdentity
WinGuessingGame ( ) : void

Called by the metadata reader when it has successfully parsed a custom attribute blob.

Method Details

FindAssembly() public method

public FindAssembly ( Microsoft.Cci.AssemblyIdentity assemblyIdentity ) : IAssembly
assemblyIdentity Microsoft.Cci.AssemblyIdentity
return IAssembly

FindModule() public method

public FindModule ( Microsoft.Cci.ModuleIdentity moduleIdentity ) : IModule
moduleIdentity Microsoft.Cci.ModuleIdentity
return IModule

FindUnit() public method

public FindUnit ( Microsoft.Cci.UnitIdentity unitIdentity ) : IUnit
unitIdentity Microsoft.Cci.UnitIdentity
return IUnit

GuessUnderlyingTypeSizeOfUnresolvableReferenceToEnum() public method

Returns a guess of the size of the underlying type of the given type reference to an enum type, which is assumed to be unresolvable because it is defined an assembly that is not loaded into this host. Successive calls to the method will cycle through these values with a periodicity determined by the number of types in the game and the successful guesses made in earlier games.
public GuessUnderlyingTypeSizeOfUnresolvableReferenceToEnum ( ITypeReference reference ) : byte
reference ITypeReference A type reference that cannot be resolved.
return byte

LoadAssembly() public method

public LoadAssembly ( Microsoft.Cci.AssemblyIdentity assemblyIdentity ) : IAssembly
assemblyIdentity Microsoft.Cci.AssemblyIdentity
return IAssembly

LoadModule() public method

public LoadModule ( Microsoft.Cci.ModuleIdentity moduleIdentity ) : IModule
moduleIdentity Microsoft.Cci.ModuleIdentity
return IModule

LoadUnit() public method

public LoadUnit ( Microsoft.Cci.UnitIdentity unitIdentity ) : IUnit
unitIdentity Microsoft.Cci.UnitIdentity
return IUnit

LoadUnitFrom() public method

public LoadUnitFrom ( string location ) : IUnit
location string
return IUnit

OpenBinaryDocument() public method

Open the binary document as a memory block in host dependent fashion.
public OpenBinaryDocument ( IBinaryDocument sourceDocument ) : IBinaryDocumentMemoryBlock
sourceDocument IBinaryDocument The binary document that is to be opened.
return IBinaryDocumentMemoryBlock

OpenBinaryDocument() public method

Open the child binary document within the context of parent source document.as a memory block in host dependent fashion For example: in multimodule assemblies the main module will be parentSourceDocument, where as other modules will be child docuements.
public OpenBinaryDocument ( IBinaryDocument parentSourceDocument, string childDocumentName ) : IBinaryDocumentMemoryBlock
parentSourceDocument IBinaryDocument The source document indicating the child document location.
childDocumentName string The name of the child document.
return IBinaryDocumentMemoryBlock

ProbeAssemblyReference() public method

public ProbeAssemblyReference ( IUnit referringUnit, Microsoft.Cci.AssemblyIdentity referencedAssembly ) : Microsoft.Cci.AssemblyIdentity
referringUnit IUnit
referencedAssembly Microsoft.Cci.AssemblyIdentity
return Microsoft.Cci.AssemblyIdentity

ProbeModuleReference() public method

public ProbeModuleReference ( IUnit referringUnit, Microsoft.Cci.ModuleIdentity referencedModule ) : Microsoft.Cci.ModuleIdentity
referringUnit IUnit
referencedModule Microsoft.Cci.ModuleIdentity
return Microsoft.Cci.ModuleIdentity

Redirect() public method

Provides the host with an opportunity to add, remove or substitute assembly references in the given list. This avoids the cost of rewriting the entire unit in order to make such changes.
public Redirect ( IUnit referringUnit, IEnumerable assemblyReferences ) : IEnumerable
referringUnit IUnit The unit that contains these references.
assemblyReferences IEnumerable The assembly references to substitute.
return IEnumerable

Redirect() public method

Provides the host with an opportunity to substitute one type reference for another during metadata reading. This avoids the cost of rewriting the entire unit in order to make such changes.
public Redirect ( IUnit referringUnit, INamedTypeReference typeReference ) : INamedTypeReference
referringUnit IUnit The unit that contains the reference.
typeReference INamedTypeReference A named type reference encountered during metadata reading.
return INamedTypeReference

ReportError() public method

public ReportError ( IErrorMessage error ) : void
error IErrorMessage
return void

ReportErrors() public method

public ReportErrors ( ErrorEventArgs errorEventArguments ) : void
errorEventArguments System.IO.ErrorEventArgs
return void

ResolvingAssemblyReference() public method

This method is called when the assembly reference is being resolved and its not already loaded by the host.
public ResolvingAssemblyReference ( IUnit referringUnit, Microsoft.Cci.AssemblyIdentity referencedAssembly ) : void
referringUnit IUnit The unit that is referencing the assembly.
referencedAssembly Microsoft.Cci.AssemblyIdentity Assembly identifier for the assembly being referenced.
return void

ResolvingModuleReference() public method

This method is called when the module reference is being resolved and its not already loaded by the host.
public ResolvingModuleReference ( IUnit referringUnit, Microsoft.Cci.ModuleIdentity referencedModule ) : void
referringUnit IUnit The unit that is referencing the module.
referencedModule Microsoft.Cci.ModuleIdentity Module identifier for the assembly being referenced.
return void

Rewrite() public method

Provides the host with an opportunity to substitute a custom attribute with another during metadata reading. This avoids the cost of rewriting the entire unit in order to make such changes.
public Rewrite ( IUnit containingUnit, ICustomAttribute customAttribute ) : ICustomAttribute
containingUnit IUnit The unit that contains the custom attribute.
customAttribute ICustomAttribute The custom attribute to rewrite (fix up).
return ICustomAttribute

Rewrite() public method

Provides the host with an opportunity to substitute one method definition for another during metadata reading. This avoids the cost of rewriting the entire unit in order to make such changes.
public Rewrite ( IUnit containingUnit, IMethodDefinition methodDefinition ) : IMethodDefinition
containingUnit IUnit The unit that is defines the method.
methodDefinition IMethodDefinition A method definition encountered during metadata reading.
return IMethodDefinition

StartGuessingGame() public method

Called by the metadata reader when it is about to start parsing a custom attribute blob.
public StartGuessingGame ( ) : void
return void

TryNextPermutation() public method

Called by the metadata reader when it has unsucessfully tried to parse a custom attribute blob and it now needs to try a new permutation. Returns false if no more perumations are possible.
public TryNextPermutation ( ) : bool
return bool

UnifyAssembly() public method

public UnifyAssembly ( Microsoft.Cci.AssemblyIdentity assemblyIdentity ) : Microsoft.Cci.AssemblyIdentity
assemblyIdentity Microsoft.Cci.AssemblyIdentity
return Microsoft.Cci.AssemblyIdentity

UnifyAssembly() public method

public UnifyAssembly ( IAssemblyReference assemblyReference ) : Microsoft.Cci.AssemblyIdentity
assemblyReference IAssemblyReference
return Microsoft.Cci.AssemblyIdentity

WinGuessingGame() public method

Called by the metadata reader when it has successfully parsed a custom attribute blob.
public WinGuessingGame ( ) : void
return void