This file contains hidden or 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 ChatHub : Hub | |
| { | |
| public async Task Send(string name, string message) | |
| { | |
| await Clients.All.InvokeAsync("Send", name, message); | |
| } | |
| } |
This file contains hidden or 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
| dotnet --version |
This file contains hidden or 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
| nuget sources Add -Name "ASP.NET Core CI dev" -Source https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json |
This file contains hidden or 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
| dotnet add package Microsoft.AspNetCore.All -s https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json -v 2.1.0-preview1-26559 |
This file contains hidden or 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
| dotnet add package Microsoft.AspNetCore.SignalR -s https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json -v 1.0.0-alpha1-26559 |
This file contains hidden or 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
| dotnet add package Microsoft.AspNetCore.SignalR.Http -s https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json -v 1.0.0-alpha1-26559 |
This file contains hidden or 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
| npm install signalr-client --registry https://dotnet.myget.org/f/aspnetcore-ci-dev/npm/ |
This file contains hidden or 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 ChatHub : Hub | |
| { | |
| public async Task Send(string name, string message) | |
| { | |
| await Clients.All.InvokeAsync("Send", name, message); | |
| } | |
| } |
This file contains hidden or 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
| app.UseSignalR(routes => { | |
| routes.MapHub<ChatHub>("chat"); | |
| }); |
This file contains hidden or 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
| <div style="margin-top: 20px" class="container"> | |
| <div class="row"> | |
| <div class="form-inline" id="name-form"> | |
| <label class="control-label" for="nick">Type your name:</label> | |
| <input class="form-control" type="text" id="nick" /> | |
| <button class="btn btn-primary" onclick="goChat()">Let's chat!</button> | |
| </div> | |
| <div style="display: none" id="chat"> | |
| <h2 id="user-name"></h2> | |
| <form class="form-inline" id="form-send" action="#"> |
OlderNewer