C# Класс kOS.Safe.Execution.ProgramContext

Наследование: IProgramContext
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ProtectCSVField string
UpdateFileMap void
UpdateInstructionPointer void
UpdateProgram void

Открытые методы

Метод Описание
ActivatePendingTriggers ( ) : void

Take all the pending triggers that have been added by AddPendingTrigger, and finally make them become active. To be called by the CPU when it decides that enough mainline code has had a chance to happen that it's okay to enable triggers again.

ActiveTriggerCount ( ) : int

How many triggers (active) there are.

AddObjectParts ( IEnumerable parts, string objectFileID ) : int
AddParts ( IEnumerable parts ) : void
AddPendingTrigger ( int instructionPointer ) : void

Add a trigger to the list of triggers pending insertion. It will not *finish* inserting it until the CPU tells us it's a good time to do so, by calling ActivatePendingTriggers(). It will also refuse to insert a trigger that's already either active or pending insertion to the active list (avoids duplication).

ClearTriggers ( ) : void

Remove all active and pending triggers.

ContainsTrigger ( int instructionPointer ) : bool

True if the given trigger's IP is for a trigger that is currently active, or is about to become active.

DisableActiveFlyByWire ( IBindingManager manager ) : void
EnableActiveFlyByWire ( IBindingManager manager ) : void
GetAlreadyCompiledEntryPoint ( string fileID ) : int

Return the entry point into the program context where this filename was already inserted into the system before. If it hasn't been inserted before, returns a negative number as a flag indicating this fact. fileID should be a string that will be fully unique for each file (the fully qualified path name, for example).

GetCodeFragment ( int contextLines ) : List
GetCodeFragment ( int start, int stop, bool doProfile = false ) : List
GetTriggerByIndex ( int index ) : int

Return the active trigger at the given index. Cannot be used to get pending insertion triggers.

ProgramContext ( bool interpreterContext ) : System
ProgramContext ( bool interpreterContext, List program ) : System
RemoveTrigger ( int instructionPointer ) : void

Remove a trigger from current triggers or pending insertion triggers or both if need be, so it's not there anymore at all.

ToggleFlyByWire ( string paramName, bool enabled ) : void

Приватные методы

Метод Описание
ProtectCSVField ( string s ) : string

Return a version of the string that has been protected for use in a comma-separated file field by quoting and escaping as necessary any special characters inside it.

UpdateFileMap ( string fileID, int entryPoint ) : void
UpdateInstructionPointer ( List oldProgram ) : void
UpdateProgram ( List newProgram ) : void

Описание методов

ActivatePendingTriggers() публичный Метод

Take all the pending triggers that have been added by AddPendingTrigger, and finally make them become active. To be called by the CPU when it decides that enough mainline code has had a chance to happen that it's okay to enable triggers again.
public ActivatePendingTriggers ( ) : void
Результат void

ActiveTriggerCount() публичный Метод

How many triggers (active) there are.
public ActiveTriggerCount ( ) : int
Результат int

AddObjectParts() публичный Метод

public AddObjectParts ( IEnumerable parts, string objectFileID ) : int
parts IEnumerable
objectFileID string
Результат int

AddParts() публичный Метод

public AddParts ( IEnumerable parts ) : void
parts IEnumerable
Результат void

AddPendingTrigger() публичный Метод

Add a trigger to the list of triggers pending insertion. It will not *finish* inserting it until the CPU tells us it's a good time to do so, by calling ActivatePendingTriggers(). It will also refuse to insert a trigger that's already either active or pending insertion to the active list (avoids duplication).
public AddPendingTrigger ( int instructionPointer ) : void
instructionPointer int
Результат void

ClearTriggers() публичный Метод

Remove all active and pending triggers.
public ClearTriggers ( ) : void
Результат void

ContainsTrigger() публичный Метод

True if the given trigger's IP is for a trigger that is currently active, or is about to become active.
public ContainsTrigger ( int instructionPointer ) : bool
instructionPointer int
Результат bool

DisableActiveFlyByWire() публичный Метод

public DisableActiveFlyByWire ( IBindingManager manager ) : void
manager IBindingManager
Результат void

EnableActiveFlyByWire() публичный Метод

public EnableActiveFlyByWire ( IBindingManager manager ) : void
manager IBindingManager
Результат void

GetAlreadyCompiledEntryPoint() публичный Метод

Return the entry point into the program context where this filename was already inserted into the system before. If it hasn't been inserted before, returns a negative number as a flag indicating this fact. fileID should be a string that will be fully unique for each file (the fully qualified path name, for example).
public GetAlreadyCompiledEntryPoint ( string fileID ) : int
fileID string
Результат int

GetCodeFragment() публичный Метод

public GetCodeFragment ( int contextLines ) : List
contextLines int
Результат List

GetCodeFragment() публичный Метод

public GetCodeFragment ( int start, int stop, bool doProfile = false ) : List
start int
stop int
doProfile bool
Результат List

GetTriggerByIndex() публичный Метод

Return the active trigger at the given index. Cannot be used to get pending insertion triggers.
public GetTriggerByIndex ( int index ) : int
index int
Результат int

ProgramContext() публичный Метод

public ProgramContext ( bool interpreterContext ) : System
interpreterContext bool
Результат System

ProgramContext() публичный Метод

public ProgramContext ( bool interpreterContext, List program ) : System
interpreterContext bool
program List
Результат System

RemoveTrigger() публичный Метод

Remove a trigger from current triggers or pending insertion triggers or both if need be, so it's not there anymore at all.
public RemoveTrigger ( int instructionPointer ) : void
instructionPointer int
Результат void

ToggleFlyByWire() публичный Метод

public ToggleFlyByWire ( string paramName, bool enabled ) : void
paramName string
enabled bool
Результат void