partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.AppConfiguration.Runtime.Json.JsonObject container) { // API is defined in a way that, to disable CMK, you need to pass null as keyIdentifier and/or identityClientId // However this is impossible in PowerShell, because when you pass a $null to a [System.String]$var, it's converted to string.Empty // To work-around that, I made this customization if (this._keyIdentifier == string.Empty) { container["keyIdentifier"] = JsonNode.FromObject(null); } if (this._identityClientId == string.Empty) { container["identityClientId"] = JsonNode.FromObject(null); } }
public string Serialize() { return(JsonNode.FromObject(items.Select(i => i.Value)).ToString(pretty: true)); }
// lambda:InvokeFunction public Task <InvokeResult> InvokeAsync(string functionName, object param) => InvokeFunctionAsync(new InvokeRequest(functionName, JsonNode.FromObject(param)));