* Enabled application custom thing types to be registered.
1) Deleted old ItemTypeRegistrar and ItemTypeManager
2) Added IThingTypeRegistrar and exposed it via ConnectionFactory - as such thing type registration is not per connection lifecycle, so a seperate method to register thing type is exposed from ConnectionFactory for clients and webhealthvaultfactory for web
3) Added unit tests for thing type registrar an thingdeserializer
Enabled application custom thing types to be registered.
1) Deleted old ItemTypeRegistrar and ItemTypeManager
2) Added IThingTypeRegistrar and exposed it via ConnectionFactory - as such thing type registration is not per connection lifecycle, so a seperate method to register thing type is exposed from ConnectionFactory for clients and webhealthvaultfactory for web
3) Added unit tests for thing type registrar an thingdeserializer
Cherry-picked commit from targetting master to release branch
* Avoiding excessively lock for healthvaultconnection based on PR comment
* Removed the IHealthVaultRestClient, in favor of a IHealthVaultRestAuthorizer, which directly hooks into the auto-generated API.
* Updated auto-rest API to use ModernHttpClient
* Added default for the REST URL to point to US prod.
* Fixed broken unit tests by adding protections to only try and refresh the Web session credential if it is null or expired.
* Trigger a new PR build
* Consolidate to Microsoft.Rest.ClientRuntime 2.3.8
* Trigger a new PR build again
- Ran the CoreFX CodeFormatter tool on the solution
- Exempted generated code, since it'll get out of date the next time we import from Swagger
- Adding copyright header to the tool, applying it to all cs files
#55403
- Includes OneSDK.vssettings file to codify many of the style rules.
- Updates README.md to highlight the official style guide.
- Ran a solution-wide Edit -> Format Document pass to bring files in line.
- Manual pass for renaming private/internal fields with _ or s_ naming convention.
* Adding Unit tests for HealthVault web project
Added unit tests for provider
Added unit tests for service instance provider class
Added unit tests for web connection info provider
Added unit tests for Offline and Web connection classes
Fixed few issues
Made classes to be IOC friendly to enable unit test mocks. Fixed few issues. Added some additional comments on tests. Test all sandbox apps and exisiting unit tests
* Added Unit tests for HealthVaultFactory
Added unit tests for online web connection
Adding offline connection unit tests
Completed unit tests for webhealthvaultfactory class
Cleaned up using statements
Added unit tests for shellurlbuilder
* Delete Unit tests for certificate info provider
* Resolved merge issues
* Removed the downgrade for .NET Standard
* We now reference the latest NETStandard.Library: 1.6.1
* An update to the rest client library let us upgrade JSON library to 10.0.2
* We no longer ask for specific versions in the .nuspec files
* Fixed crashing issue for UWP Native mode by specifying the neutral resource language in the PCLs.
This still does not work for Windows Phone, but it appears there isn't anything we can do for that for now. The bug has been reported to the .NET team and they are following up.
Verified that all sandbox and sample apps run.
Added unit tests for provider
Added unit tests for service instance provider class
Added unit tests for web connection info provider
Added unit tests for Offline and Web connection classes
Fixed few issues
Made classes to be IOC friendly to enable unit test mocks. Fixed few issues. Added some additional comments on tests. Test all sandbox apps and exisiting unit tests
Forced NetStandard library version 1.6.0 everywhere and rolled back NuGet references to make sure we get old version of System.IO.Compression.dll . Needed to remove the [Serializable] attributes from some exceptions because that nuget package brought back the troublemaker compression DLL.
Refactored some common properties for .NET Standard projects to NetStandard.Common.targets, including version. Updated assembly version script to update this file, and changed other projects to use SharedVersionInfo.cs so it picks up the new version that the script writes to it.
Also updated script to no longer require the versions to be a specific value in order to do the replacement
* Added tests for HealthVaultSodaConnection, HealthVaultConnectionFactoryInternal and ShellAuthService.
* Fixed possibility of null reference when calling HealthVaultSodaConnection.AuthorizeAdditionalRecordsAsync before doing initial auth.
* Fixed connection adding an extra unnecessary "/wildcat.ashx" at the end of the platform URL.
* Renamed HealthVaultUrl and HealthVaultShellUrl to DefaultHealthVaultUrl and DefaultHealthVaultShellUrl to emphasize that these are only the starting URLs and they can be bounced to another location.
* Refactored HealthVaultConnectionBase to take more dependencies on the constructor rather than resolve dynamically from the IoC.
Refactor of messages to have greater separation of concerns
* Renames HealthVaultRequest to HealthVaultMessage
* Removes Connection references from HealthVaultMessage
* Removes HealthWebRequestFactory
* Renames EasyWebRequest
Added sandbox web project
Added a redirect controller to take care of shell Action target query
Resolved bugs and made the sandbox web app work with no issues in Offline and Online scenarios.
Implemented WebHealthVaultConnection and OfflineHealthVaultConnection and related classes:-
Implemented WebSessionCredentialClient, CertificateInfoProvider
Implemented RequireSignInAttribute to authenticate the request
Delted obsolote Web and MVC projects
Related work items: #50477
Fixing most build warnings
- Lots of comments requiring an updated exception type and a changed method name.
- Lots of warnings from comments referencing exceptions from System.
- Skipped .Web and .Web.Mvc, which are about to have a lot of churn.
+ Move Get*Client methods from HealthVaultConnection to HealthVaultFactory
+ Classes that need IHealthVaultConnection shouldn't depend on IConnectionInternal
+ Remove public Connection property from Client classes
+ Added TODO to eliminate circular call in Connection class
First review, still requires some testing
Added DeauthorizeApplicationAsync to client connection, which deletes connection information and deauthorizes the app for all authorized records.
Changed GetConnection method to a synchronous one that does not try to run authentication, making it on-demand.
Updated PersonInfo property to GetPersonInfoAsync() to support idea that the connection object might not have the information on hand.
Moved SessionCredential and ServiceInfo properties off of the public IHealthVaultConnection to IConnectionInternal
Fixed bug in android browser auth broker that caused it to fail on the second attempt.
Fixed Delete method in UwpSecretStore.
Fixed build/publish configurations for SandboxUwp project.
* Moved item types into the core project and deleted the ItemTypes project
* Changed resources to .resx format. Added missing resources, removed a lot of the exception methods on the validation class.
* Added new base exception type
1. Deleted code that deals with Crypto stuff which is no longer being used. The crypto stuff in the new world is being provided by ICryptographer
2. Untangled web code from core sdk part.
3. Moved code into specific folders
4. Added some methods in platform client.
Related work items: #49905
- Allowing consumers to set the configuration for the WebHealthVaultFactory
- Also protecting configuration sets once a connection has been created
Related work items: #49608
Implementing TODO items
- Converting old code to use IConnection.ExecuteAsync
- Throwing exceptions when setting Configuration after getting a Connection (Web side blocked waiting on other commits)
Related work items: #49608
Implemented client connection class. Needed to refactor the session credential client a bit since the client project needs different data to call it. The ISessionCredentialClient is now provided by a CreateSessionCredentialClient abstract method on the Connection class. Each SDK supplies its own version.
Also made ApplicationId an abstract property on connection so a setter is not required.
Implemented NewApplicationCreationInfo method on PlatformClient.
* Removed IConfiguration interface in favor of HealthVaultConfiguration.
* Updated client to register the config as both ClientConfiguration and HealthVaultConfiguration.
* Removed AllowInstanceBounce from ClientConfiguration as the base already has MultiInstanceAware.
* Updated ShellAuthService to respect the IsMultiRecordApp flag
* Removed some unused extension methods
* Updated some code to read service info off of the connection rather than the "default" values in config.