Пример #1
0
        public BaseResult <SMSSendResult> Send(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);

            GSMCommunication.Feature.SMS sms    = new GSMCommunication.Feature.SMS(param.TryGet <BasicInformation>("base"));
            BaseResult <SMSSendResult>   result = null;

            result = sms.Send(param.TryGet <string>("message"), param.TryGet <string>("number"));
            if (result != null)
            {
                result.ID = param.TryGet <string>("id");

                IInternalLogging logging    = ObjectPool.Instance.Resolve <IInternalLogging>();
                ISMSLogging      smsLogging = ObjectPool.Instance.Resolve <ISMSLogging>();

                if (logging != null)
                {
                    logging.Write(result);
                }
                if (smsLogging != null)
                {
                    smsLogging.Send(result);
                }
            }

            return(result);
        }
Пример #2
0
        public BaseResult<SMSSendResult> Send(ParameterizedMap map)
        {
            UnboxParameterizedMap param = new UnboxParameterizedMap(map);
            GSMCommunication.Feature.SMS sms = new GSMCommunication.Feature.SMS(param.TryGet<BasicInformation>("base"));
            BaseResult<SMSSendResult> result = null;
            result = sms.Send(param.TryGet<string>("message"), param.TryGet<string>("number"));
            if (result != null)
            {
                result.ID = param.TryGet<string>("id");

                IInternalLogging logging = ObjectPool.Instance.Resolve<IInternalLogging>();
                ISMSLogging smsLogging = ObjectPool.Instance.Resolve<ISMSLogging>();

                if (logging != null)
                    logging.Write(result);
                if (smsLogging != null)
                    smsLogging.Send(result); 

            }
                
            return result;
        }