public string ToCsv() { return(string.Join(",", //AssemblyId.ToString().FormatForCsv(), AssemblyName.FormatForCsv(), //PluginTypeId.ToString().FormatForCsv(), PluginTypeName, StepId.ToString().FormatForCsv(), StepName.FormatForCsv(), FormatForCsv(ImageId), ImageName.FormatForCsv(), Environment.FormatForCsv(), GetStateText(Environment == "Source" ? "target": "source").FormatForCsv(), StepMessageName.FormatForCsv(), EntityName.FormatForCsv(), StepFilteringAttributes.FormatForCsv(), FormatForCsv(RunAsUserId), RunAsUserName.FormatForCsv(), StepRank.ToString().FormatForCsv(), StepDescription.FormatForCsv(), StepStageName.FormatForCsv(), StepModeName.FormatForCsv(), StepSupportedDeploymentName.FormatForCsv(), StepAsyncAutoDelete.ToString(), StepConfiguration.FormatForCsv(), StepSecureConfiguration.FormatForCsv(), ImageAttributes.FormatForCsv() )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (StepId != null) { hashCode = hashCode * 59 + StepId.GetHashCode(); } if (PhaseId != null) { hashCode = hashCode * 59 + PhaseId.GetHashCode(); } if (Action != null) { hashCode = hashCode * 59 + Action.GetHashCode(); } if (Repository != null) { hashCode = hashCode * 59 + Repository.GetHashCode(); } if (Branch != null) { hashCode = hashCode * 59 + Branch.GetHashCode(); } if (Environment != null) { hashCode = hashCode * 59 + Environment.GetHashCode(); } if (EnvironmentType != null) { hashCode = hashCode * 59 + EnvironmentType.GetHashCode(); } if (StartedAt != null) { hashCode = hashCode * 59 + StartedAt.GetHashCode(); } if (FinishedAt != null) { hashCode = hashCode * 59 + FinishedAt.GetHashCode(); } if (Details != null) { hashCode = hashCode * 59 + Details.GetHashCode(); } hashCode = hashCode * 59 + Status.GetHashCode(); if (Links != null) { hashCode = hashCode * 59 + Links.GetHashCode(); } return(hashCode); } }
public void LogExecutionTime(StepId stepId, long executionTimeInMilliseconds) { GameMessageHandler(new MessageDebug { Message = "[Quest Engine Execution Time] " + stepId + ": " + executionTimeInMilliseconds }); //PluginHost.LogDebug("[Quest Engine Execution Time] " + stepId + ": " + executionTimeInMilliseconds); }
public async Task <StepEditionAggregate?> FindByIdAsync(StepId id) { var step = await _context.Steps .Include(s => s.Tests) .Include(s => s.ProgrammingLanguage) .FirstOrDefaultAsync(s => !s.IsDeleted && s.Id == id.Value); return(step is null ? null : ToAggregate(step)); }
protected void WhenStep(StepId id, Action <LambdaStepConfiguration <TContext> > config, Maybe <Action <StepConfiguration <LambdaStep <TContext>, TContext> > > mayStepConfig = default) { var stepConfig = new LambdaStepConfiguration <TContext>(); config.Invoke(stepConfig); var stepConfiguration = WhenStep(id, stepConfig.Build()); Do(from postStepConfig in mayStepConfig select Action(() => postStepConfig.Invoke(stepConfiguration))); }
public void Setup() { _name = "Test step"; _description = "Test description"; _headerCode = "Test header"; _id = new StepId(Guid.NewGuid()); _difficulty = 4; _score = 42; _languageId = new ProgrammingLanguageId(Guid.NewGuid()); }
protected void WhenStep(StepId id, Action <LambdaStepConfiguration <TContext> > config, Action <StepConfiguration <LambdaStep <TContext>, TContext> >?con = null) { var stepConfig = new LambdaStepConfiguration <TContext>(); config.Invoke(stepConfig); var concon = WhenStep(id, stepConfig.Build()); con?.Invoke(concon); }
public async Task RemoveAsync(StepId id) { var tournament = await _context.Steps .FirstOrDefaultAsync(t => !t.IsDeleted && t.Id == id.Value); if (tournament is not null) { tournament.IsDeleted = true; } await _context.SaveChangesAsync(); }
public override int GetHashCode() { unchecked { var hashCode = (StepId != null ? StepId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Key != null ? Key.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Value != null ? Value.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)Type; return(hashCode); } }
public override int GetHashCode() { return(Id.GetHashCode() ^ AssemblyId.GetHashCode() ^ PluginId.GetHashCode() ^ StepId.GetHashCode() ^ Attributes.GetHashCode() ^ Name.GetHashCode() ^ RelatedAttribute.GetHashCode() ^ EntityAlias.GetHashCode() ^ ImageType.GetHashCode() ^ MessagePropertyName.GetHashCode()); }
async Task <HashSet <StepId> > GetIdsOfStepsAlreadyExecuted() { var mongoCollection = _mongoDatabase.GetCollection <BsonDocument>(_options.CollectionName); using (var cursor = await mongoCollection.FindAsync(s => true)) { var documents = await cursor.ToListAsync(); var stepIds = documents .Select(doc => StepId.Parse(doc["_id"].AsString)); return(new HashSet <StepId>(stepIds)); } }
private void ReloadLoopTick() { // if this is the first time reloading this quest and step, set reload loops to zero string thisQuestId = QuestId.ToString() + "_" + StepId.ToString(); if (thisQuestId != _lastReloadLoopQuestStep) { _questStepReloadLoops = 0; } // increment ReloadLoops _questStepReloadLoops++; // record this quest Id and step Id _lastReloadLoopQuestStep = thisQuestId; }
public int CompareTo(object obj) { var guideStep = obj as Step; if (guideStep == null) { return(-1); } if (GuideId < guideStep.GuideId) { return(-1); } else if (GuideId > guideStep.GuideId) { return(1); } return(StepId.CompareTo(guideStep.StepId)); }
/// <summary> /// Gets the list of data for use by the jqgrid plug-in /// </summary> public IActionResult OnGetGridDataGroupedByWorKflowId(string sidx, string sord, int _page, int rows) { // using a groupField in the jqgrid passes that field // along with the field to sort, remove the groupField string groupBy = "WorkflowName asc, "; sidx = sidx.Replace(groupBy, ""); int totalRecords = WorkflowStepsMaster.GetRecordCount(); int startRowIndex = ((_page * rows) - rows); List <WorkflowStepsMaster> objWorkflowStepsMasterCol = WorkflowStepsMaster.SelectSkipAndTake(rows, startRowIndex, sidx + " " + sord); int totalPages = (int)Math.Ceiling((float)totalRecords / (float)rows); if (objWorkflowStepsMasterCol is null) { return(new JsonResult("{ total = 0, page = 0, records = 0, rows = null }")); } var jsonData = new { total = totalPages, _page, records = totalRecords, rows = ( from objWorkflowStepsMaster in objWorkflowStepsMasterCol select new { id = objWorkflowStepsMaster.StepId, cell = new string[] { objWorkflowStepsMaster.StepId.ToString(), objWorkflowStepsMaster.WorKflowId.HasValue ? objWorkflowStepsMaster.WorKflowId.Value.ToString() : "", objWorkflowStepsMaster.ApprovalLevel, objWorkflowStepsMaster.Description, objWorkflowStepsMaster.AutoApprove, objWorkflowStepsMaster.WaitTime.HasValue ? objWorkflowStepsMaster.WaitTime.Value.ToString() : "", objWorkflowStepsMaster.CreatedBy, objWorkflowStepsMaster.CreatedOn.ToString("d"), objWorkflowStepsMaster.UpdatedBy, objWorkflowStepsMaster.UpdatedOn.ToString("d"), objWorkflowStepsMaster.WorKflowId is null ? "" : objWorkflowStepsMaster.WorKflowIdNavigation.WorkflowName } }).ToArray()
public void Start(GameInput input) { StepInput = input; if (RequiredInputId != InputId.None && StepInput == null) { if (StepInput == null) { Logger.LogError("[" + StepId + "] No input received"); } else { throw new InvalidGameInput(StepInput.InputId, RequiredInputId); } } else { LogDebug("[Execute Step][" + StepId.ToString() + "]"); Execute(); } }
get => new EndStep() { Id = new StepId(END_STEP_GUID), Orders = OrchestrationOrderCollection.NoOrder() }; }
get => new NoStep() { Id = new StepId(NO_STEP_GUID), Orders = OrchestrationOrderCollection.NoOrder() }; }
public Step(StepId id, StepType stepType = StepType.Normal) : this() { Id = id; StepType = stepType; }
public Step() { Id = new StepId(Guid.NewGuid().ToString()); Orders = OrchestrationOrderCollection.NoOrder(); StepType = StepType.Normal; }
public ChainCall(StepId id, ChainCall?baseCall = null) { BaseCall = baseCall; StepIds = new[] { id }; Position = 0; }
public Step(StepConfiguration configuration) { this.Id = StepId.Generate(); this._configuration = configuration; }
public ActionResult SaveStep(string prm = "") { StepModel objStepModel = new StepModel(); try { //if prm(Paramter) is empty means Add condition else edit condition if (!String.IsNullOrEmpty(prm)) { int StepId; //decrypt parameter and set in StepId variable int.TryParse(CommonUtils.Decrypt(prm), out StepId); //Get Step detail by Step Id serviceResponse = objUtilityWeb.GetAsync(WebApiURL.Step + "/GetStepById?StepId=" + StepId.ToString()); objStepModel = serviceResponse.StatusCode == HttpStatusCode.OK ? serviceResponse.Content.ReadAsAsync <StepModel>().Result : null; } } catch (Exception ex) { ErrorLog(ex, "Step", "SaveStep Get"); } return(View("SaveStep", objStepModel)); }
public StepSessionEntity(StepId id, IList <TournamentId> tournamentIds, IList <TestEntity> tests) : base(id, tournamentIds) { TournamentIds = tournamentIds; Tests = tests; }
/// <summary> /// Returns true if PipelineExecutionStepState instances are equal /// </summary> /// <param name="other">Instance of PipelineExecutionStepState to be compared</param> /// <returns>Boolean</returns> public bool Equals(PipelineExecutionStepState other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( StepId == other.StepId || StepId != null && StepId.Equals(other.StepId) ) && ( PhaseId == other.PhaseId || PhaseId != null && PhaseId.Equals(other.PhaseId) ) && ( Action == other.Action || Action != null && Action.Equals(other.Action) ) && ( Repository == other.Repository || Repository != null && Repository.Equals(other.Repository) ) && ( Branch == other.Branch || Branch != null && Branch.Equals(other.Branch) ) && ( Environment == other.Environment || Environment != null && Environment.Equals(other.Environment) ) && ( EnvironmentType == other.EnvironmentType || EnvironmentType != null && EnvironmentType.Equals(other.EnvironmentType) ) && ( StartedAt == other.StartedAt || StartedAt != null && StartedAt.Equals(other.StartedAt) ) && ( FinishedAt == other.FinishedAt || FinishedAt != null && FinishedAt.Equals(other.FinishedAt) ) && ( Details == other.Details || Details != null && other.Details != null && Details.SequenceEqual(other.Details) ) && ( Status == other.Status || Status.Equals(other.Status) ) && ( Links == other.Links || Links != null && Links.Equals(other.Links) )); }
protected Step(GameMessageHandler hander, StepId stepId, InputId requiredInputId = InputId.None) { RequiredInputId = requiredInputId; StepId = stepId; DispatchMessage = hander; }
public ChainCall(StepId id, Maybe <ChainCall> baseCall = default) { BaseCall = baseCall; StepIds = new[] { id }; Position = May(0); }