CSharpEditor  1.1.2
A C# source code editor with syntax highlighting, intelligent code completion and real-time compilation error checking
CSharpEditor.CachedMetadataReference Class Reference

This class represents a cached MetadataReference. When an instance of this class is created using the CreateFromFile(string, string) method, we check whether a CachedMetadataReference to the same file has already been created and, in that case, return a reference to that object, rathern than creating a new one. More...

Public Member Functions

 CachedMetadataReference (MetadataReference reference)
 Creates a new CachedMetadataReference wrapping the specified reference . More...
 

Static Public Member Functions

static CachedMetadataReference CreateFromFile (string path, string xmlDocumentationPath=null)
 Creates a new CachedMetadataReference from an assembly file (optionally including the XML documentation). More...
 
static implicit operator MetadataReference (CachedMetadataReference reference)
 Converts a CachedMetadataReference into a MetadataReference. More...
 

Detailed Description

This class represents a cached MetadataReference. When an instance of this class is created using the CreateFromFile(string, string) method, we check whether a CachedMetadataReference to the same file has already been created and, in that case, return a reference to that object, rathern than creating a new one.

Definition at line 28 of file CachedMetadataReference.cs.

Constructor & Destructor Documentation

◆ CachedMetadataReference()

CSharpEditor.CachedMetadataReference.CachedMetadataReference ( MetadataReference  reference)

Creates a new CachedMetadataReference wrapping the specified reference .

Parameters
referenceThe MetadataReference wrap in a new CachedMetadataReference.

Definition at line 38 of file CachedMetadataReference.cs.

Member Function Documentation

◆ CreateFromFile()

static CachedMetadataReference CSharpEditor.CachedMetadataReference.CreateFromFile ( string  path,
string  xmlDocumentationPath = null 
)
static

Creates a new CachedMetadataReference from an assembly file (optionally including the XML documentation).

Parameters
pathThe path to the assembly file.
xmlDocumentationPathThe path to the XML documentation file for the assembly.
Returns
If a CachedMetadataReference has already been created from the same assembly file and the same XML documentation, a reference to the previously created object. Otherwise, a new CachedMetadataReference wrapping a MetadataReference created from the specified assembly file.

Definition at line 52 of file CachedMetadataReference.cs.

◆ operator MetadataReference()

static implicit CSharpEditor.CachedMetadataReference.operator MetadataReference ( CachedMetadataReference  reference)
static

Converts a CachedMetadataReference into a MetadataReference.

Parameters
referenceThe CachedMetadataReference to convert.

Definition at line 73 of file CachedMetadataReference.cs.


The documentation for this class was generated from the following file: