CodeInfo

StockSharp.Algo.Compilation

Информация о коде.

Наследует: NotifiableObject

Реализует: IAsyncPersistable, IDisposable

Конструкторы

CodeInfo
public CodeInfo()
codeInfo = CodeInfo()

Инициализирует новый экземпляр CodeInfo.

Свойства

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

Последняя построенная сборка.

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

Ссылки на сборку.

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

Дополнительные исходные коды.

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

Идентификатор.

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

Код компилируемый.

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

Язык кода.

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

Имя модуля.

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

Имя.

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

NuGet references.

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

Тип объекта.

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

Ссылки на файлы.

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

Код.

Методы

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

Скомпилируйте код.

isTypeCompatible
Совместим ли тип.
typeName
Введите имя.

Возвращает: CompilationResult

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

Скомпилируйте код.

isTypeCompatible
Совместим ли тип.
typeName
Введите имя.
cancellationToken
CancellationToken

Возвращает: CompilationResult

Dispose
public void Dispose()
codeInfo.Dispose()

Удаляет элементы в пуле, реализующие 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.

Возвращает: 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.

Возвращает: A task that represents the asynchronous save operation.

События

Compiled
public event Action Compiled
codeInfo.Compiled += handler

Скомпилированное событие.