/// <summary> /// Constructor. /// </summary> /// <param name="theDelegate">theDelegate will throw a ArgumentNullException if null.</param> /// <param name="ts">Retry timer interval. If null timespan will be 30 seconds.</param> public ServiceProxy(ProxiedServiceDelegate theDelegate, TimeSpan ts) { if (theDelegate == null) { throw new ArgumentNullException("theDelegate", "ProxiedServiceDelegate cannot be null."); } CreateService = theDelegate; _retryTimeSpan = ts; _platformService = Ioc.Container.Instance.Resolve <IPlatformService>(); }
private void Dispose(bool disposing) { if (!_disposed) { if (disposing) { StopWorker(); CreateService = null; try { // not going to do this want this instance to remain open. //Messages.Instance.Dispose(); } catch (Exception ex) { _logger.Error("Failed to dispose data access : " + ex.Message, ex); } } _disposed = true; } }