示例#1
0
        public bool Initialize(string jsonString = null)
        {
            if (jsonString == null && this.BaseUrl != "")
            {
                if (!_listDictionary)
                {
                    IListResponse <T, R> mr = (IListResponse <T, R>) this.Send();
                    this._Success = mr.Success;
                    this._Message = mr.Message;

                    if (this.Success)
                    {
                        this.Process(mr);
                    }
                }
                else
                {
                    IListDictionaryResponse <T, R> mr = (IListDictionaryResponse <T, R>) this.Send();
                    this._Success = mr.Success;
                    this._Message = mr.Message;

                    if (this.Success)
                    {
                        this.Process(mr);
                    }
                }

                return(this.Success);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        public override bool Initialize(string jsonString = null)
        {
            if (jsonString == null && _url != "")
            {
                IListDictionaryResponse <T, R> mr = (IListDictionaryResponse <T, R>) this.Send(_url);
                this._Success = mr.Success;
                this._Message = mr.Message;

                if (this.Success)
                {
                    this.Process(mr);
                }

                return(this.Success);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
 public abstract void Process(IListDictionaryResponse <T, R> mr);