Ejemplo n.º 1
0
        private void Release()
        {
            if (webService != null)
            {
                webService.Dispose();
                webService = null;
            }

            GC.SuppressFinalize(this);
        }
Ejemplo n.º 2
0
 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_MAT();
     if (!string.IsNullOrEmpty(serviceURL))
     {
         webService.Url     = serviceURL;
         webService.Timeout = serviceTimeout;
         //webService.Credentials = System.Net.CredentialCache.DefaultCredentials;
     }
 }