public static GetClient ( ) : Microsoft.Health.HealthClientApplication | ||
return | Microsoft.Health.HealthClientApplication |
protected override void ProcessRecord() { HealthClientApplication clientApp = HvShellUtilities.GetClient(); ServiceInfo s = clientApp.ApplicationConnection.GetServiceDefinition(); WriteObject(s); }
protected override void ProcessRecord() { HealthClientApplication clientApp = HvShellUtilities.GetClient(); List <PersonInfo> authorizedPeople = new List <PersonInfo>(clientApp.ApplicationConnection.GetAuthorizedPeople()); // Create an authorized connection for each person on the // list. HealthClientAuthorizedConnection authConnection = clientApp.CreateAuthorizedConnection( authorizedPeople[0].PersonId); // Use the authorized connection to read the user's default // health record. HealthRecordAccessor access = new HealthRecordAccessor( authConnection, authConnection.GetPersonInfo().GetSelfRecord().Id); // Search the health record for basic demographic // information. // Most user records contain an item of this type. HealthRecordSearcher search = access.CreateSearcher(); HealthRecordFilter filter = new HealthRecordFilter( HvShellUtilities.NameToTypeId(Type)); search.Filters.Add(filter); foreach (Object o in search.GetMatchingItems()[0]) { WriteObject(o); } }
protected override void ProcessRecord() { HealthClientApplication clientApp = HvShellUtilities.GetClient(); if (clientApp.GetApplicationInfo() != null) { List <PersonInfo> authorizedPeople = new List <PersonInfo>(clientApp.ApplicationConnection.GetAuthorizedPeople()); WriteObject(authorizedPeople); } }
protected override void ProcessRecord() { if (string.IsNullOrEmpty(ThingType)) { HealthClientApplication clientApp = HvShellUtilities.GetClient(); WriteObject(clientApp.ApplicationConnection.GetVocabulary("thing-types")); } else { WriteObject( ItemTypeManager.GetHealthRecordItemTypeDefinition( new Guid(ThingType), HvShellUtilities.GetClient().ApplicationConnection) ); } }
protected override void ProcessRecord() { HealthClientApplication clientApp = HvShellUtilities.GetClient(); List <PersonInfo> authorizedPeople = new List <PersonInfo> (clientApp.ApplicationConnection.GetAuthorizedPeople()); // Create an authorized connection for each person on the // list. HealthClientAuthorizedConnection authConnection = clientApp.CreateAuthorizedConnection( authorizedPeople[0].PersonId); // Use the authorized connection to read the user's default // health record. HealthRecordAccessor access = new HealthRecordAccessor( authConnection, authConnection.GetPersonInfo().GetSelfRecord().Id); Weight weight = new Weight(); weight.Value = new WeightValue(Value / 2.2, new DisplayValue(Value, "pounds")); access.NewItem(weight); }
protected override void ProcessRecord() { HealthClientApplication clientApp = HvShellUtilities.GetClient(); List <PersonInfo> authorizedPeople = new List <PersonInfo> (clientApp.ApplicationConnection.GetAuthorizedPeople()); // Create an authorized connection for each person on the // list. HealthClientAuthorizedConnection authConnection = clientApp.CreateAuthorizedConnection( authorizedPeople[0].PersonId); // Use the authorized connection to read the user's default // health record. HealthRecordAccessor accessor = new HealthRecordAccessor( authConnection, authConnection.GetPersonInfo().GetSelfRecord().Id); HealthServiceRequest request = new HealthServiceRequest(accessor.Connection, "PutThings", 2, accessor); // Read the input file request.Parameters = System.IO.File.ReadAllText(Path.GetFullPath(FileName)); request.Execute(); }
protected override void ProcessRecord() { HealthClientApplication clientApp = HvShellUtilities.GetClient(); WriteObject(clientApp.ApplicationConnection.GetVocabularyKeys()); }