Esempio n. 1
0
        /// <summary>
        ///     Creates a new <see cref="!:SessionModel" /> instance.
        /// </summary>
        /// <returns>
        ///     A newly instantiated <see cref="!:SessionModel" /> instance.
        /// </returns>
        public static Consensus.Learning.Session Create(ConsensusSite site)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Learning.ISessionModel model = provider.Learning.Session.Create();
            return(model == null ? null : new Consensus.Learning.Session(model));
        }
Esempio n. 2
0
        /// <summary>
        ///     Retrieves a specific <see cref="!:SessionModel" /> instance.
        /// </summary>
        /// <param name="id">
        ///     The unique value which distinctly identifies the <see cref="!:SessionModel" /> instance to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref="!:SessionModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found.
        /// </returns>
        public static Consensus.Learning.Session FetchById(ConsensusSite site, System.String id)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Learning.ISessionModel model = provider.Learning.Session.FetchById(id);
            return(model == null ? null : new Consensus.Learning.Session(model));
        }
Esempio n. 3
0
        public static Consensus.Learning.Session CreateFromEvent(ConsensusSite site, System.String eventId)
        {
            IBusinessProvider provider = site.GetService <IBusinessProvider>();

            Consensus.Learning.ISessionModel model = provider.Learning.Session.CreateFromEvent(eventId);
            return(model == null ? null : new Consensus.Learning.Session(model));
        }