Table of Contents

Class CodeExtensions

Namespace
StockSharp.Algo.Compilation
Assembly
StockSharp.Algo.dll

Extension class.

public static class CodeExtensions
Inheritance
CodeExtensions
Inherited Members

Fields

DefaultLanguage

Default language.

public const string DefaultLanguage = ".cs"

Field Value

string

MsCorLib

Microsoft Core Library.

public const string MsCorLib = "mscorlib"

Field Value

string

Properties

DefaultReferences

Default references.

public static IEnumerable<AssemblyReference> DefaultReferences { get; }

Property Value

IEnumerable<AssemblyReference>

FSharpReferences

F# references.

public static IEnumerable<AssemblyReference> FSharpReferences { get; }

Property Value

IEnumerable<AssemblyReference>

ProjectReferences

Project references.

public static IEnumerable<ICodeReference> ProjectReferences { get; }

Property Value

IEnumerable<ICodeReference>

Methods

AddAsmRef(CodeInfo, string)

Add assembly reference.

public static void AddAsmRef(this CodeInfo ci, string asmFile)

Parameters

ci CodeInfo

CodeInfo

asmFile string

Assembly path.

AddProjectReference(ICodeReference)

Add project reference.

public static void AddProjectReference(ICodeReference reference)

Parameters

reference ICodeReference

ICodeReference

GetCSharpCompiler()

Get C# compiler.

public static ICompiler GetCSharpCompiler()

Returns

ICompiler

ICompiler

GetCompiler(string)

Try get compiler for the specified file extension.

public static ICompiler GetCompiler(this string fileExt)

Parameters

fileExt string

File extension.

Returns

ICompiler

ICompiler

IsCodeExtension(string)

Determine whether the specified file extension is a code file.

public static bool IsCodeExtension(this string fileExt)

Parameters

fileExt string

File extension.

Returns

bool

Check result.

IsReferencesSupported(CodeInfo)

Determine whether the specified code supports references.

public static bool IsReferencesSupported(this CodeInfo code)

Parameters

code CodeInfo

CodeInfo

Returns

bool

Check result.

IsReferencesSupported(string)

Determines whether the specified file extension supports references.

public static bool IsReferencesSupported(this string langExt)

Parameters

langExt string

Language

Returns

bool

Check result.

RemoveProjectReference(string)

Remove project reference.

public static bool RemoveProjectReference(string id)

Parameters

id string

Id

Returns

bool

Check result.

TryGetCSharpCompiler()

Try get C# compiler.

public static ICompiler TryGetCSharpCompiler()

Returns

ICompiler

ICompiler

TryGetCompiler(string)

Try get compiler for the specified language.

public static ICompiler TryGetCompiler(this string fileExt)

Parameters

fileExt string

File extension.

Returns

ICompiler

ICompiler

TryGetProjectReference(string, out ICodeReference)

Try get project reference.

public static bool TryGetProjectReference(string id, out ICodeReference reference)

Parameters

id string

Id

reference ICodeReference

ICodeReference

Returns

bool

Check result.