private void Release() { if (webService != null) { webService.Dispose(); webService = null; } GC.SuppressFinalize(this); }
ServiceProvider() { serviceTimeout = int.Parse(MobileConfiguration.Configuration.Settings["ServiceTimeOut"].ToString(), NumberStyles.AllowThousands); serviceURL = string.Format("{0}?Number={1}", MobileConfiguration.Configuration.Settings["ServiceURL"].ToString(), GetInfiniteRandomNumbers()); //serviceURL = MobileConfiguration.Configuration.Settings["ServiceURL"].ToString(); webService = new ServiceRef.Service_FGWHS(); if (!string.IsNullOrEmpty(serviceURL)) { webService.Url = serviceURL; webService.Timeout = serviceTimeout; //webService.Credentials = System.Net.CredentialCache.DefaultCredentials; } }