Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public List <GroupType> Groups()
        {
            try
            {
                if (_groups == null)
                {
                    _groups = _client.API.GetGroups(new GetGroupsReq()
                    {
                        header = Client.RequestHeader
                    });
                }

                if (_groups.errorCode == (int)errorCode.No_error)
                {
                    return(_groups.groupTypeItems.ToList <GroupType>());
                }

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

            finally
            {
                _groups = null;
            }
            return(new List <GroupType>());
        }
Ejemplo n.º 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)
                {
                }

                _create      = null;
                _createGroup = null;
                _delete      = null;
                _deleteGroup = null;
                _groups      = null;
                _update      = null;

                disposedValue = true;
            }
        }