This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# we make a new schema | |
$newApiManagementSchemaParams = @{ | |
Context = $ApiManagementContext | |
ApiId = $newApiRevision.ApiId | |
SchemaDocumentContentType = "application/json" | |
SchemaDocumentFilePath = $apiSpecificationPath | |
} | |
New-AzApiManagementApiSchema @newApiManagementSchemaParams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# increment the revision based off the current revision number | |
$newRevision = [int]$apiSpecification.ApiRevision + 1; | |
# now lets create an api revision | |
$newApiRevisionParams = @{ | |
Context = $apiManagementContext | |
ApiId = $apiSpecification.ApiId | |
ApiRevision = $newRevision | |
SourceApiRevision = $apiSpecification.ApiRevision | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$apiSpecifications = Get-AzApiManagementApi -Context $apiManagementContext | |
#now we filter out the specification object that we want | |
$apiSpecification = $apiSpecifications | Where-Object { $_.Name -eq $apiName } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lets get the API Management context | |
$apiManagementContextParams = @{ | |
ResourceGroupName = $resourceGroupName | |
ServiceName = $apimServiceName | |
} | |
$apiManagementContext = New-AzApiManagementContext @apiManagementContextParams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$resourceGroupName = "<the-rg-name>" | |
$apimServiceName = "<the-apim-servcie-name>" | |
$apiSpecificationPath = "some/path/to/spec.json" | |
$apiName = "<the-api-name>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Akkatecture.Tests.UnitTests.Jobs.ScheduledJobsTests.SchedulingJob_For5minutes_DispatchesJobMessage | |
Failed: Expected no messages during 00:00:01, instead we received <Akkatecture.TestHelpers.Jobs.TestJobDone> from [akka://jobs-tests/user/$a/test-job-runner-supervisor/test-job-runner#1730104005] after 00:00:00.0000030 | |
Expected: True | |
Actual: False | |
at Akka.TestKit.TestKitBase.InternalExpectNoMsg(TimeSpan duration) | |
at Akka.TestKit.TestKitBase.ExpectNoMsg(TimeSpan duration) | |
at Akkatecture.Tests.UnitTests.Jobs.ScheduledJobsTests.SchedulingJob_For5minutes_DispatchesJobMessage() in /Users/lutandongqakaza/Workspace/Akkatecture/Akkatecture/test/Akkatecture.Tests/UnitTests/Jobs/ScheduledJobsTests.cs:line 89 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomAdapter : DefaultEventAdapter | |
{ | |
protected override byte[] ToBytes(object @event, JObject metadata, out string type, out bool isJson) | |
{ | |
var bytes = base.ToBytes(@event, metadata, out type, out isJson); | |
//Add some additional metadata: | |
metadata["additionalProp"] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class WebSockets | |
{ | |
public static void Main(string[] args) | |
{ | |
RunWebSockets().GetAwaiter().GetResult(); | |
} | |
private static async Task RunWebSockets() | |
{ | |
var ws = new ClientWebSocket(); //------v please use a fresh token to test out this is just a PoC client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Forum.Interfaces; | |
using System; | |
using System.Threading.Tasks; | |
using Formum.Api.Authorization.Models; | |
using Formum.Api.Authorization.Operations; | |
using Forum.Models; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
namespace Forum.Api.Controllers |
NewerOlder