/// <summary> /// Attempts to retrieve the <see cref="StateDefinition"/> with the specified name /// </summary> /// <param name="name">The name of the <see cref="StateDefinition"/> to retrieve</param> /// <param name="state">The <see cref="StateDefinition"/> with the specified name, if any</param> /// <returns>A boolean indicating whether or not a <see cref="StateDefinition"/> with the specified name could be found</returns> public virtual bool TryGetState(string name, out StateDefinition state) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException(nameof(name)); } state = this.GetState(name) !; return(state != null); }
/// <summary> /// Attempts to the start <see cref="StateDefinition"/> /// </summary> /// <param name="state">The start <see cref="StateDefinition"/></param> /// <returns>A boolean indicating whether or not the <see cref="WorkflowDefinition"/>'s start <see cref="StateDefinition"/> could be found</returns> public virtual bool TryGetStartState(out StateDefinition state) { state = this.GetStartState() !; return(state != null); }