Пример #1
0
        /// <summary>
        /// The client MUST be connected to access to this service.
        /// Allow a hubapp client to create a hMessage with a hConvState payload.
        /// </summary>
        /// <param name="actor"></param>
        /// <param name="convid"></param>
        /// <param name="status"></param>
        /// <param name="mOptions"></param>
        /// <returns></returns>
        public HMessage BuildConvState(string actor, string convid, string status, HMessageOptions mOptions)
        {
            if (actor == null || actor.Length <= 0)
            {
                throw new MissingAttrException("actor");
            }
            if (convid == null || convid.Length <= 0)
            {
                throw new MissingAttrException("convid");
            }
            if (status == null || status.Length <= 0)
            {
                throw new MissingAttrException("status");
            }

            HConvState convState = new HConvState();

            convState.SetStatus(status);

            HMessage message = BuildMessage(actor, "hConvState", convState, mOptions);

            message.SetConvid(convid);
            return(message);
        }
Пример #2
0
 public HMessage BuildMessage(string actor, string type, HConvState payload, HMessageOptions mOptions)
 {
     return(InnerBuildMessage(actor, type, payload, mOptions));
 }