예제 #1
0
        /// <summary>
        /// Constructor requires ConnectionServer where SNPP provider is homed.  Can optionally pass in an ObjectId to load that
        /// SMPP provider data.
        /// </summary>
        public SmppProvider(ConnectionServerRest pConnectionServer, string pObjectId = "")
        {
            if (pConnectionServer == null)
            {
                throw new ArgumentException("Null ConnectionServer passed to SmppProvider constructor");
            }

            if (string.IsNullOrEmpty(pObjectId))
            {
                return;
            }

            WebCallResult res = GetSmppProvider(pConnectionServer, pObjectId);

            if (res.Success == false)
            {
                throw new UnityConnectionRestException(res, "Failed to find SmppProvider in SmppConstructor:" + res.ToString());
            }
        }
예제 #2
0
        /// <summary>
        /// Constructor requeires ConnectionServer object to pull time zone details from.
        /// </summary>
        public TimeZones(ConnectionServerRest pConnectionServer)
        {
            if (pConnectionServer == null)
            {
                throw new ArgumentException("Null ConnectionServer referenced pasted to TimeZones construtor");
            }

            WebCallResult res = LoadTimeZones(pConnectionServer);

            if (res.Success == false)
            {
                throw new UnityConnectionRestException(res, "Failed to fetch timezones in TimeZones constructor:" + res.ToString());
            }
        }