C# Class Microsoft.Cci.SourceEditHostEnvironment

Provides an abstraction over the application hosting compilers based on this framework.
Inheritance: MetadataReaderHost, ISourceEditHost
显示文件 Open project: visualmutator/visualmutator

Public Methods

Method Description
GetUnitSetFor ( Microsoft.Cci.UnitSetIdentity referencedUnitSet ) : IUnitSet

Gets a unit set corresponding to the referenced unit set.

RegisterAsLatest ( ICompilation compilation ) : void

Registers the output of the given compilation as the latest unit associated with the given location. Such units can then be discovered by clients via GetUnit.

ReportEdits ( Microsoft.Cci.EditEventArgs editEventArguments ) : void

Raises the Edits event with the given edit event arguments. The events are raised on different thread.

ReportSymbolTableEdits ( Microsoft.Cci.EditEventArgs editEventArguments ) : void

Raises the SymbolTableEdits event with the given edit event arguments. The events are raised on different thread.

Protected Methods

Method Description
SourceEditHostEnvironment ( INameTable nameTable, IInternFactory factory, byte pointerSize, IEnumerable searchPaths, bool searchInGAC ) : System

Allocates an object that provides an abstraction over the application hosting compilers based on this framework.

Private Methods

Method Description
ReportEditsUsingDifferentThread ( object state ) : void

Raises the Edits event with the given edit event arguments.

ReportSymbolTableEditsUsingDifferentThread ( object state ) : void

Raises the SymbolTableEdits event with the given edit event arguments.

UnitsAreTheSameObjects ( List unitList, IEnumerable unitEnumeration ) : bool

Returns true if the given list of units has the same number of elements as the given enumeration of units and each corresponding element is the object.

Method Details

GetUnitSetFor() public method

Gets a unit set corresponding to the referenced unit set.
public GetUnitSetFor ( Microsoft.Cci.UnitSetIdentity referencedUnitSet ) : IUnitSet
referencedUnitSet Microsoft.Cci.UnitSetIdentity
return IUnitSet

RegisterAsLatest() public method

Registers the output of the given compilation as the latest unit associated with the given location. Such units can then be discovered by clients via GetUnit.
public RegisterAsLatest ( ICompilation compilation ) : void
compilation ICompilation
return void

ReportEdits() public method

Raises the Edits event with the given edit event arguments. The events are raised on different thread.
public ReportEdits ( Microsoft.Cci.EditEventArgs editEventArguments ) : void
editEventArguments Microsoft.Cci.EditEventArgs
return void

ReportSymbolTableEdits() public method

Raises the SymbolTableEdits event with the given edit event arguments. The events are raised on different thread.
public ReportSymbolTableEdits ( Microsoft.Cci.EditEventArgs editEventArguments ) : void
editEventArguments Microsoft.Cci.EditEventArgs
return void

SourceEditHostEnvironment() protected method

Allocates an object that provides an abstraction over the application hosting compilers based on this framework.
protected SourceEditHostEnvironment ( INameTable nameTable, IInternFactory factory, byte pointerSize, IEnumerable searchPaths, bool searchInGAC ) : System
nameTable INameTable /// A collection of IName instances that represent names that are commonly used during compilation. /// This is a provided as a parameter to the host environment in order to allow more than one host /// environment to co-exist while agreeing on how to map strings to IName instances. ///
factory IInternFactory /// The intern factory to use when generating keys. When comparing two or more assemblies using /// TypeHelper, MemberHelper, etc. it is necessary to make the hosts use the same intern factory. ///
pointerSize byte The size of a pointer on the runtime that is the target of the metadata units to be loaded /// into this metadta host. This parameter only matters if the host application wants to work out what the exact layout /// of a struct will be on the target runtime. The framework uses this value in methods such as TypeHelper.SizeOfType and /// TypeHelper.TypeAlignment. If the host application does not care about the pointer size it can provide 0 as the value /// of this parameter. In that case, the first reference to IMetadataHost.PointerSize will probe the list of loaded assemblies /// to find an assembly that either requires 32 bit pointers or 64 bit pointers. If no such assembly is found, the default is 32 bit pointers. ///
searchPaths IEnumerable /// A collection of strings that are interpreted as valid paths which are used to search for units. ///
searchInGAC bool /// Whether the GAC (Global Assembly Cache) should be searched when resolving references. ///
return System