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; } }
/// <summary> /// /// </summary> /// <param name="groupSubscriptionType"></param> public void Delete(GroupSubscriptionType groupSubscriptionType = null) { try { if (_deleteGroup == null) { var req = new DeleteGroupSubscriptionReq() { header = Client.RequestHeader }; if (groupSubscriptionType != null) { req.groupSubscriptionType = groupSubscriptionType; } _deleteGroup = _client.API.DeleteGroupSubscription(req); } if (_deleteGroup.errorCode == (int)errorCode.No_error) { return; } throw new FlexMailException(_deleteGroup.errorMessage, _deleteGroup.errorCode); } catch (Exception ex) { //telemetry.TrackException(ex, new Dictionary<string, string> { { "Flexmail", "Group.Delete" } }); if (ex is FlexMailException) { throw (ex); } } finally { _deleteGroup = null; } return; }