Exemplo n.º 1
0
        /// <summary>
        /// Sends an xAPI statement to the configured LRS.  This version will use the common actor.
        ///
        /// To assign a common actor, provide an actor to XAPIWrapper.AssignCommonActor().
        /// </summary>
        /// <param name="Actor"></param>
        /// <param name="Verb"></param>
        /// <param name="Object"></param>
        /// <param name="Result"></param>
        public static void SendStatement(Verb Verb, Activity Activity, Result Result = null, Action <StatementStoredResponse> callback = null)
        {
            // Make sure we actually have a common actor
            if (XAPIWrapper.HasCommonActor == false)
            {
                throw new System.NullReferenceException("XAPIWrapper.CommonActor is null.  This value is required for this variation of XAPIWrapper.SendStatement");
            }

            XAPIWrapper.SendStatement(XAPIWrapper.CommonActor, Verb, Activity, Result, callback);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sends an xAPI statement to the configured LRS.  This requires all necessary part of an xAPI statement.
        /// </summary>
        /// <param name="Actor"></param>
        /// <param name="Verb"></param>
        /// <param name="Object"></param>
        /// <param name="Result"></param>
        public static void SendStatement(Actor Actor, Verb Verb, Activity Activity, Result Result = null, Action <StatementStoredResponse> callback = null)
        {
            var statement = new Statement(Actor, Verb, Activity);

            if (Result != null)
            {
                statement.Result = Result;
            }

            XAPIWrapper.SendStatement(statement, callback);
        }