Exemplo n.º 1
0
 /// <summary>
 /// Build and return GCMMessage.
 /// </summary>
 /// <remarks></remarks>
 /// <returns>GCMMessage</returns>
 public GCMMessage Build()
 {
     if (this.mMessageData != null && !GCMData.IsValidData(this.mMessageData))
     {
         throw new SystemException("Data contains key that is GCM reserve word");
     }
     return(new GCMMessage(this.mMessageData, this.mParent));
 }
            /// <summary>
            /// Build and return KiiPushMessage.
            /// </summary>
            /// <remarks></remarks>
            /// <returns>KiiPushMessage</returns>
            public KiiPushMessage Build()
            {
                if (this.mGcm.OptBoolean("enabled"))
                {
                    if (this.mMessageData != null && !GCMData.IsValidData(this.mMessageData))
                    {
                        throw new SystemException("Data contains key that is GCM reserve word");
                    }
                }
                KiiPushMessage msg = new KiiPushMessage(this.mMessageData, this.mParent, this.mGcm, this.mApns, this.mMqtt);

                return(msg);
            }