Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public List <FormType> Forms()
        {
            try
            {
                if (_forms == null)
                {
                    _forms = _client.API.GetForms(new GetFormsReq()
                    {
                        header = Client.RequestHeader
                    });
                }

                if (_forms.errorCode == (int)errorCode.No_error)
                {
                    return(_forms.formTypeItems.ToList <FormType>());
                }

                throw new FlexMailException(_forms.errorMessage, _forms.errorCode);
            }
            catch (Exception ex)
            {
                //telemetry.TrackException(ex, new Dictionary<string, string> { { "Flexmail", "Form.Forms" } });
                if (ex is FlexMailException)
                {
                    throw (ex);
                }
            }

            finally
            {
                _forms = null;
            }
            return(new List <FormType>());;
        }
Exemple #2
0
        private bool disposedValue = false; // To detect redundant calls

        /// <summary>
        ///
        /// </summary>
        /// <param name="disposing"></param>
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                }

                _forms   = null;
                _results = null;

                disposedValue = true;
            }
        }