static Processor() { commands = new Dictionary <string, ICommand>(); commands["set"] = new SetValueCommand(); commands["get"] = new GetValueCommand(); commands["sadd"] = new SetAddMemberCommand(); commands["srem"] = new SetRemoveMemberCommand(); commands["sismember"] = new SetIsMemberCommand(); }
private bool TryGetValueFromAutomationIdentifier(AutomationIdentifier controlIdentifier, out string value, int ordinal, AutomationIdentifier parentIdentifier) { value = null; var command = new GetValueCommand { AutomationIdentifier = controlIdentifier, Ordinal = ordinal, ParentIdentifier = parentIdentifier }; var result = SyncExecuteCommand(command); var successResult = result as SuccessResult; if (successResult == null) { return(false); } value = successResult.ResultText; return(true); }
public ValuesController(GetValueCommand getValueCommand, GetValuesCommand getValuesCommand) { _getValueCommand = getValueCommand; _getValuesCommand = getValuesCommand; }
private bool TryGetValueFromAutomationIdentifier(AutomationIdentifier controlIdentifier, out string value, int ordinal, AutomationIdentifier parentIdentifier) { value = null; var command = new GetValueCommand { AutomationIdentifier = controlIdentifier, Ordinal = ordinal, ParentIdentifier = parentIdentifier }; var result = SyncExecuteCommand(command); var successResult = result as SuccessResult; if (successResult == null) { return false; } value = successResult.ResultText; return true; }
private bool TryGetValueFromAutomationIdentifier(AutomationIdentifier automationIdentifier, out string textValue) { textValue = null; var command = new GetValueCommand() { AutomationIdentifier = automationIdentifier }; var result = SyncExecuteCommand(command); var successResult = result as SuccessResult; if (successResult == null) return false; textValue = successResult.ResultText; return true; }