public HealthVaultClient(
            AppInfo appInfo,
            ServiceInfo serviceInfo,
            IHttpTransport transport,
            IHttpStreamer streamer,
            ICryptographer cryptographer,
            IWebAuthorizer authorizer)
        {
            appInfo.ValidateRequired("appInfo");
            serviceInfo.ValidateRequired("serviceInfo");
            if (transport == null)
            {
                throw new ArgumentNullException("transport");
            }
            if (streamer == null)
            {
                throw new ArgumentNullException("streamer");
            }
            if (cryptographer == null)
            {
                throw new ArgumentNullException("cryptographer");
            }
            if (authorizer == null)
            {
                throw new ArgumentNullException("authorizer");
            }

            m_appInfo = appInfo;
            m_serviceInfo = serviceInfo;
            m_transport = transport;
            m_streamer = streamer;
            m_cryptographer = cryptographer;
            m_authorizer = authorizer;

            m_serviceMethods = new ServiceMethods(this);
            m_recordMethods = new RecordMethods(this);
            m_shell = new Shell(this);

            m_secretStore = new SecretStore(MakeStoreName(m_appInfo.MasterAppId));
            m_state = new ClientState();
            LoadState();
        }
 //----------------------------------------
 //
 // State mgmt
 //
 //----------------------------------------
 public void LoadState()
 {
     lock (m_state)
     {
         try
         {
             ClientState state = ClientState.Load(m_secretStore);
             m_state = state;
         }
         catch
         {
         }
     }
 }