PowerShell/test/xUnit/csharp
Dongbo Wang c606b1ca37 Refactor ConvertTo-Json to expose JsonObject.ConvertToJson as a public API (#8682)
We have the public API `JsonObject.ConvertFromJson` to convert from JSON string in the PowerShell context. It would be good to have a public API for conversion to JSON. This PR refactors the `ConvertTo-Json` cmdlet to move the core implementation to `JsonObject.ConvertToJson`, and make `ConvertTo-Json` call that public method.

This would help the Azure Function PowerShell worker. Currently, we depends on [calling the cmdlet](729710d259/src/PowerShell/PowerShellManager.cs (L198-L205)) to convert object to JSON which is expensive. Once we have the public method `JsonObject.ConvertToJson` exposed, we can call the API directly to avoid a command invocation.
2019-01-23 10:39:12 -08:00
..
test_Binders.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_CorePsPlatform.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_ExtensionMethods.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_FileSystemProvider.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_MshSnapinInfo.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_PSConfiguration.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_PSVersionInfo.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_Runspace.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_SecuritySupport.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_SessionState.cs Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
test_Utils.cs Refactor ConvertTo-Json to expose JsonObject.ConvertToJson as a public API (#8682) 2019-01-23 10:39:12 -08:00