protected override void Execute(CodeActivityContext context) { var settings = new ConnectionSettings(new Uri(URL.Get(context))); settings.ThrowExceptions(alwaysThrow: true); settings.PrettyJson(); if (AuthenticationRequired.Get(context) == true) { settings.BasicAuthentication(Username.Get(context), Password.Get(context)); } var esClient = new ElasticClient(settings); var searchData = esClient.Search <UiPathESLog>(sd => sd .Index(Index.Get(context)) .Size(MaxSize.Get(context)) .Query(q => q. Match(m => m .Field(f => f.processName) .Query(ProcessName.Get(context) == string.Empty ? "*" : ProcessName.Get(context))) && q. Match(m => m .Field(f => f.robotName) .Query(RobotName.Get(context) == string.Empty ? "*" : RobotName.Get(context))) && q .DateRange(r => r .Field(f => f.timeStamp) .GreaterThanOrEquals(StartTime.Get(context)) .LessThanOrEquals(EndTime.Get(context))))); Logs.Set(context, searchData.Documents.ToArray()); }
public Task(SimpleTimePointExecutor outerInstance, RobotName robotName, IList <RobotData> robotDataList, Population population, bool updateRobots) { this.outerInstance = outerInstance; this.robotName = robotName; this.robotDataList = robotDataList; this.population = population; this.updateRobots_Renamed = updateRobots; }
public override int GetHashCode() { int hash = 1; if (IsUpdate != false) { hash ^= IsUpdate.GetHashCode(); } if (Username.Length != 0) { hash ^= Username.GetHashCode(); } if (Password.Length != 0) { hash ^= Password.GetHashCode(); } if (RobotID.Length != 0) { hash ^= RobotID.GetHashCode(); } if (RobotName.Length != 0) { hash ^= RobotName.GetHashCode(); } if (RobotUser.Length != 0) { hash ^= RobotUser.GetHashCode(); } if (RobotPassword.Length != 0) { hash ^= RobotPassword.GetHashCode(); } if (RobotIP.Length != 0) { hash ^= RobotIP.GetHashCode(); } if (PairCode.Length != 0) { hash ^= PairCode.GetHashCode(); } if (StoreLocally != false) { hash ^= StoreLocally.GetHashCode(); } if (LogDir.Length != 0) { hash ^= LogDir.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }