CodeInfo

StockSharp.Algo.Compilation

Code info.

Inherits: NotifiableObject

Implements: IAsyncPersistable, IDisposable

Constructors

CodeInfo
public CodeInfo()
codeInfo = CodeInfo()

Initializes a new instance of the CodeInfo.

Properties

Assembly
public byte[] Assembly { get; private set; }
value = codeInfo.Assembly
codeInfo.Assembly = value

Last built assembly.

AssemblyReferences
public IList<AssemblyReference> AssemblyReferences { get; }
value = codeInfo.AssemblyReferences

Assembly references.

ExtraSources
public string[] ExtraSources { get; set; }
value = codeInfo.ExtraSources
codeInfo.ExtraSources = value

Extra source codes.

Id
public Guid Id { get; set; }
value = codeInfo.Id
codeInfo.Id = value

Identifier.

IsCompilable
public bool IsCompilable { get; private set; }
value = codeInfo.IsCompilable
codeInfo.IsCompilable = value

The code is compilable.

Language
public string Language { get; set; }
value = codeInfo.Language
codeInfo.Language = value

Code language.

ModuleName
public string ModuleName { get; set; }
value = codeInfo.ModuleName
codeInfo.ModuleName = value

Module name.

Name
public string Name { get; set; }
value = codeInfo.Name
codeInfo.Name = value

Name.

NuGetReferences
public IList<NuGetReference> NuGetReferences { get; }
value = codeInfo.NuGetReferences

NuGet references.

ObjectType
public Type ObjectType { get; private set; }
value = codeInfo.ObjectType
codeInfo.ObjectType = value

Object type.

ProjectReferences
public IList<ICodeReference> ProjectReferences { get; }
value = codeInfo.ProjectReferences

File references.

Text
public string Text { get; set; }
value = codeInfo.Text
codeInfo.Text = value

Code.

Methods

Compile
public IEnumerable<CompilationError> Compile(Func<Type, bool> isTypeCompatible, string typeName)
result = codeInfo.Compile(isTypeCompatible, typeName)

Compile code.

isTypeCompatible
Is type compatible.
typeName
Type name.

Returns: CompilationResult

CompileAsync
public Task<IEnumerable<CompilationError>> CompileAsync(Func<Type, bool> isTypeCompatible, string typeName, CancellationToken cancellationToken)
result = codeInfo.CompileAsync(isTypeCompatible, typeName, cancellationToken)

Compile code.

isTypeCompatible
Is type compatible.
typeName
Type name.
cancellationToken
CancellationToken

Returns: CompilationResult

Dispose
public void Dispose()
codeInfo.Dispose()

Disposes of items in the pool that implement IDisposable.

LoadAsync
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = codeInfo.LoadAsync(storage, cancellationToken)

Asynchronously loads the state of the object from the specified SettingsStorage.

storage
The SettingsStorage instance from which to load the data.
cancellationToken
A token to monitor for cancellation requests.

Returns: A task that represents the asynchronous load operation.

SaveAsync
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = codeInfo.SaveAsync(storage, cancellationToken)

Asynchronously saves the state of the object to the specified SettingsStorage.

storage
The SettingsStorage instance to which to save the data.
cancellationToken
A token to monitor for cancellation requests.

Returns: A task that represents the asynchronous save operation.

Events

Compiled
public event Action Compiled
codeInfo.Compiled += handler

Compiled event.