본문으로 건너뛰기

IVariableManager

지속성, 로딩 및 변경 추적을 포함하여 액터 전체의 변수를 관리합니다.

네임스페이스: ControlBee.Interfaces

상속: INotifyPropertyChanged

속성

이름타입설명
LocalNamestring현재 로컬(레시피) 이름입니다.
LocalNamesstring[]사용 가능한 모든 로컬 이름입니다.
Modifiedbool저장되지 않은 변경 사항이 있는 변수가 있는지 여부입니다.

메서드

Add

관리자에 변수를 등록합니다.

void Add(IVariable variable);

Save

모든 변수를 데이터베이스에 저장합니다.

void Save(string? localName = null);

매개변수:

  • localName — 저장할 선택적 로컬 이름입니다. 지정하지 않으면 현재 이름을 사용합니다.

Load

데이터베이스에서 모든 변수를 로드합니다.

void Load(string? localName = null);

Delete

지정된 로컬 이름의 모든 변수를 삭제합니다.

void Delete(string localName);

ReadVariable<T>

위치별로 변수 값을 읽습니다.

T ReadVariable<T>(string localName, string actorName, string itemPath) where T : new();

WriteVariable

위치별로 변수 값을 씁니다.

void WriteVariable(string localName, string actorName, string itemPath, string value);
void WriteVariable<T>(string localName, string actorName, string itemPath, T value) where T : new();
void WriteVariable(Type variableType, string localName, string actorName, string itemPath, object value);

ReadVariableChanges

변수 변경 기록을 읽습니다.

DataTable ReadVariableChanges(QueryOptions? options = null);

SaveTemporaryVariables

임시로 수정된 변수를 저장합니다.

void SaveTemporaryVariables();

DiscardChanges

저장되지 않은 모든 변수 변경 사항을 삭제합니다.

void DiscardChanges();

Reload

데이터베이스에서 모든 변수를 다시 로드합니다.

void Reload();

RenameLocalName

로컬(레시피) 이름을 변경합니다.

void RenameLocalName(string sourceLocalName, string targetLocalName);

이벤트

LoadCompleted

로딩이 완료되면 발생합니다.

event EventHandler<string>? LoadCompleted;

참고