예제 #1
0
        /// <summary>
        /// Start getting the new application info from the HealthVault platform.
        /// </summary>
        /// <param name="state">The current state.</param>
        private static void StartNewApplicationCreationInfo(AuthenticationCheckState state)
        {
            HealthVaultRequest request = HealthVaultRequest.Create("NewApplicationCreationInfo", "1", null, NewApplicationCreationInfoCompleted);

            request.UserState = state;

            state.Service.BeginSendRequest(request);
        }
예제 #2
0
        /// <summary>
        /// Start making the CreateAuthenticatedSessionToken call.
        /// </summary>
        /// <param name="state">The current state.</param>
        private static void StartCastCall(AuthenticationCheckState state)
        {
            XElement           info    = state.Service.CreateCastCallInfoSection();
            HealthVaultRequest request = HealthVaultRequest.Create("CreateAuthenticatedSessionToken", "2", info, CastCallCompleted);

            request.UserState = state;

            state.Service.BeginSendRequest(request);
        }
예제 #3
0
        /// <summary>
        /// Refresh the session token.
        /// </summary>
        /// <remarks>Makes a CAST call to get a new session token,
        /// and then re-issues the original request.</remarks>
        /// <param name="args">The request information.</param>
        private void RefreshSessionToken(SendPostEventArgs args)
        {
            AuthorizationSessionToken = null;

            XElement           info    = CreateCastCallInfoSection();
            HealthVaultRequest request = HealthVaultRequest.Create("CreateAuthenticatedSessionToken", "2", info, RefreshSessionTokenCompleted);

            request.UserState = args;

            BeginSendRequest(request);
        }
예제 #4
0
        /// <summary>
        /// Start getting the list of authorized people.
        /// </summary>
        /// <param name="state">The current state.</param>
        private static void StartGetAuthorizedPeople(AuthenticationCheckState state)
        {
            XElement info = new XElement("info",
                                         new XElement("parameters")
                                         );

            HealthVaultRequest request = HealthVaultRequest.Create("GetAuthorizedPeople", "1", info, GetAuthorizedPeopleCompleted);

            request.UserState = state;

            state.Service.BeginSendRequest(request);
        }