Exemple #1
0
 /// <summary>
 /// Adds an Activity with a direct relation to the Activity which is the Object of the Statement.
 /// In almost all cases there is only one sensible parent or none, not multiple.
 /// <para>For example: a Statement about a quiz question would have the quiz as its parent Activity.</para>
 /// </summary>
 /// <param name="activityBuilder">An Activity builder that is used to build a concrete Activity.</param>
 /// <returns>The builder class, for the fluent API.</returns>
 public IContextBuilder AddParent(IActivityBuilder activityBuilder) =>
 AddParent(activityBuilder.Build());
Exemple #2
0
 /// <summary>
 /// Adds an Activity that that doesn't fit one of the other properties.
 /// <para>For example: Anna studies a textbook for a biology exam. The Statement's Activity refers to the textbook, and the exam is a contextActivity of type other.</para>
 /// </summary>
 /// <param name="activityBuilder">An Activity builder that is used to build a concrete Activity</param>
 /// <returns>The builder class, for the fluent API.</returns>
 public IContextBuilder AddOther(IActivityBuilder activityBuilder) =>
 AddOther(activityBuilder.Build());
Exemple #3
0
 /// <summary>
 /// Adds an Activity with an indirect relation to the Activity which is the Object of the Statement.
 /// <para>For example: a course that is part of a qualification. The course has several classes. The course relates to a class as the parent, the qualification relates to the class as the grouping.</para>
 /// </summary>
 /// <param name="activityBuilder">An Activity builder that is used to build a concrete Activity</param>
 /// <returns>The builder class, for the fluent API.</returns>
 public IContextBuilder AddGroupings(IActivityBuilder activityBuilder) =>
 AddGrouping(activityBuilder.Build());
Exemple #4
0
 /// <summary>
 /// Adds an activity that is used to categorize the Statement. "Tags" would be a synonym.
 /// <para>Category SHOULD be used to indicate a profile of xAPI behaviors, as well as other categorizations.</para>
 /// <para>For example: Anna attempts a biology exam, and the Statement is tracked using the cmi5 profile. The Statement's Activity refers to the exam, and the category is the cmi5 profile.</para>
 /// </summary>
 /// <param name="activityBuilder">An Activity builder that is used to build a concrete Activity</param>
 /// <returns>The context builder, to continue the fluent configuration.</returns>
 public IContextBuilder AddCategory(IActivityBuilder activityBuilder) =>
 AddCategory(activityBuilder.Build());
 /// <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()));
 }
Exemple #6
0
 /// <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()));
 }