public IXTable NextVerb(IXTable source) { IVerbBuilder builder = null; ParseNextOrThrow(() => s_pipelineStageBuildersByName.TryGetValue(_scanner.Current.Value, out builder), "verb", TokenType.Value, SupportedVerbs); _currentlyBuilding.Push(builder); // Verify the Workflow Parser is this parser (need to use copy constructor on XDatabaseContext when recursing to avoid resuming by parsing the wrong query) Debug.Assert(_workflow.Parser == this); IXTable stage = null; try { stage = builder.Build(source, _workflow); } catch (Exception ex) { Rethrow(ex); } // Verify all arguments are used if (HasAnotherPart) { Throw(null); } _currentlyBuilding.Pop(); return(stage); }
private static void Add(IVerbBuilder builder) { s_pipelineStageBuildersByName[builder.Verb] = builder; }
/// <summary> /// Starts the creation of a SubStatement object. /// </summary> /// <param name="actor">Whom the SubStatement is about, as an Agent or Group Object.</param> /// <param name="verbBuilder">A builder class that creates a Verb.</param> /// <param name="activityBuilder">A builder class that creates an Activity.</param> /// <returns>A builder class that allows to fluently configure a SubStatement.</returns> public static ISubStatementBuilder CreateSubStatement(Actor actor, IVerbBuilder verbBuilder, IActivityBuilder activityBuilder) { return(CreateSubStatement(actor, verbBuilder.Build(), activityBuilder.Build())); }
/// <summary> /// Starts the creation of a Statement object with the mandatory objects passed. The Statement ID is defined /// as a parameter passed to the method. /// <para>Actor, Verb and StatementObject are mandatory, the other optional properties are /// passed through the returned Statement builder.</para> /// </summary> /// <param name="id"></param> /// <param name="actor">Whom the Statement is about, as an Agent or Group Object.</param> /// <param name="verbBuilder">An instance of a verb builder class.</param> /// <param name="activityBuilder">An instance of an activity builder class to create a statement who's object is an activity.</param> /// <returns>A builder class that allows to continue to set optional properties to the Statement.</returns> public static IStatementBuilder Create(Guid id, Actor actor, IVerbBuilder verbBuilder, IActivityBuilder activityBuilder) { return(Create(id, actor, verbBuilder.Build(), activityBuilder.Build())); }
/// <summary> /// Starts the creation of a Statement object with the mandatory objects passed. The Statement ID is defined /// as a parameter passed to the method. /// <para>Actor, Verb and StatementObject are mandatory, the other optional properties are /// passed through the returned Statement builder.</para> /// </summary> /// <param name="id"></param> /// <param name="actor">Whom the Statement is about, as an Agent or Group Object.</param> /// <param name="verbBuilder">An instance of a verb builder class.</param> /// <param name="statementObject">Activity, Agent, or another Statement that is the Object of the Statement.</param> /// <returns>A builder class that allows to continue to set optional properties to the Statement.</returns> public static IStatementBuilder Create(Guid id, Actor actor, IVerbBuilder verbBuilder, StatementObject statementObject) { return(Create(id, actor, verbBuilder.Build(), statementObject)); }
/// <summary> /// Starts the creation of a Statement object with the mandatory objects passed. The Statement ID is created /// automatically through the creation of a new Guid. /// <para>Actor, Verb and StatementObject are mandatory, the other optional properties are /// passed through the returned Statement builder.</para> /// </summary> /// <param name="actor">Whom the Statement is about, as an Agent or Group Object.</param> /// <param name="verbBuilder">An instance of a verb builder class.</param> /// <param name="subStatementBuilder">An instance of a sub-statement builder class to create a statement who's object is a substatement.</param> /// <returns>A builder class that allows to continue to set optional properties to the Statement.</returns> public static IStatementBuilder Create(Actor actor, IVerbBuilder verbBuilder, ISubStatementBuilder subStatementBuilder) { return(Create(actor, verbBuilder.Build(), subStatementBuilder.Build())); }