Skip to content

Commit

Permalink
Create error for MessagePack
Browse files Browse the repository at this point in the history
  • Loading branch information
andreatosato committed Aug 7, 2018
1 parent c628b25 commit 1ef0a96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ChatPWA/ChatApp.Backend/ChatApp.Backend/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public void ConfigureServices(IServiceCollection services)
});

services.AddSignalR(config => config.EnableDetailedErrors = true)
.AddJsonProtocol(config => config.PayloadSerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver())
//.AddMessagePackProtocol()
///.AddJsonProtocol(config => config.PayloadSerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver())
.AddMessagePackProtocol()
.AddAzureSignalR();
}
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
Expand Down
4 changes: 2 additions & 2 deletions ChatPWA/chat-app/src/app/services/chatHub.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class ChatHubService {
accessTokenFactory: () => token,
logger: LogLevel.Trace
})
.withHubProtocol(new JsonHubProtocol())
// .withHubProtocol(new MessagePackHubProtocol())
// .withHubProtocol(new JsonHubProtocol())
.withHubProtocol(new MessagePackHubProtocol())
.build();

this.connection.start()
Expand Down
2 changes: 1 addition & 1 deletion ChatPWA/chat-app/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
*/

/* Fix MessagePack */
/*
(window as any).global = window;
/*
(window as any).process = {
env: { DEBUG: undefined },
};
Expand Down

0 comments on commit 1ef0a96

Please sign in to comment.