Ejemplo n.º 1
0
 public HealthVaultClient(AppInfo appInfo, ServiceInfo serviceInfo, IWebAuthorizer webAuthBroker)
     : this(
         appInfo,
         serviceInfo,
         new HttpTransport(serviceInfo.ServiceUrl),
         new HttpStreamer(),
         new Cryptographer(),
         false,
         webAuthBroker)
 {
 }
Ejemplo n.º 2
0
        public HealthVaultClient(
            AppInfo appInfo,
            ServiceInfo serviceInfo,
            IHttpTransport transport,
            IHttpStreamer streamer,
            ICryptographer cryptographer,
            bool useOnlineAuthModel,
            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 (!useOnlineAuthModel && authorizer == null)
            {
                throw new ArgumentNullException("authorizer");
            }

            UseOnlineAuthModel = useOnlineAuthModel;
            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();
        }
Ejemplo n.º 3
0
        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();
        }