Skip to content

Commit

Permalink
Updated the 4.5 samples
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianEdwards committed Oct 30, 2012
1 parent 0730e55 commit 667d423
Show file tree
Hide file tree
Showing 11 changed files with 139 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,5 @@ protected void Application_AuthenticateRequest(object sender, EventArgs e)
}
}
}

private class SamplePipelineModule : HubPipelineModule
{
protected override bool OnBeforeIncoming(IHubIncomingInvokerContext context)
{
Debug.WriteLine("=> Invoking " + context.MethodDescriptor.Name + " on hub " + context.MethodDescriptor.Hub.Name);
return base.OnBeforeIncoming(context);
}

protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
{
Debug.WriteLine("<= Invoking " + context.Invocation.Method + " on client hub " + context.Invocation.Hub);
return base.OnBeforeOutgoing(context);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<%@ Page Title="ASP.NET SignalR: Connection Status" Language="C#" MasterPageFile="~/SignalR.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Microsoft.AspNet.SignalR.Samples.Hubs.ConnectDisconnect.Default" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<ul class="breadcrumb">
<li><a href="<%: ResolveUrl("~/") %>">SignalR Samples</a> <span class="divider">/</span></li>
<li class="active">Connection Status</li>
</ul>

<div class="page-header">
<h2>Connection Status <small>Handling client connection state</small></h2>
<p>Demonstrates how to handle the events that are raised when connections connect, reconnect and disconnect from the Hub API.</p>
</div>

<h4>Connection Status Messages</h4>
<ul id="messages">
</ul>
</asp:Content>
<asp:Content ContentPlaceHolderID="Scripts" runat="server">
<script src="<%: ResolveUrl("~/signalr/hubs") %>"></script>
<script src="Status.js"></script>
</asp:Content>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Microsoft.AspNet.SignalR.Samples.Hubs.ConnectDisconnect
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
<Content Include="Hubs\Benchmark\index.htm" />
<Content Include="Hubs\Chat\Mobile.css" />
<Content Include="Hubs\Chat\mobile.htm" />
<Content Include="Hubs\ConnectDisconnect\Default.aspx" />
<Content Include="Hubs\ConnectDisconnect\Status.js" />
<Content Include="Hubs\ConnectDisconnect\index.htm" />
<Content Include="Hubs\DemoHub\crossdomain.htm" />
<Content Include="Hubs\DemoHub\index.htm" />
<Content Include="Hubs\DemoHub\DemoHub.js" />
Expand Down Expand Up @@ -157,7 +157,7 @@
<Content Include="Scripts\remedial.js" />
<Content Include="Scripts\jquery.signalR.js" />
<Content Include="Scripts\jquery.signalR.min.js" />
<Content Include="Streaming\index.html" />
<Content Include="Streaming\Default.aspx" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
Expand Down Expand Up @@ -232,15 +232,18 @@
<Compile Include="..\Microsoft.AspNet.SignalR.Hosting.AspNet.Samples\Hubs\ShapeShare\ShapeShare.cs">
<Link>Hubs\ShapeShare\ShapeShare.cs</Link>
</Compile>
<Compile Include="..\Microsoft.AspNet.SignalR.Hosting.AspNet.Samples\Raw\Raw.cs">
<Link>Raw\Raw.cs</Link>
<Compile Include="..\Microsoft.AspNet.SignalR.Hosting.AspNet.Samples\Raw\RawConnection.cs">
<Link>Raw\RawConnection.cs</Link>
</Compile>
<Compile Include="..\Microsoft.AspNet.SignalR.Hosting.AspNet.Samples\Raw\SendingConnection.cs">
<Link>Raw\SendingConnection.cs</Link>
</Compile>
<Compile Include="..\Microsoft.AspNet.SignalR.Hosting.AspNet.Samples\Raw\TestConnection.cs">
<Link>Raw\TestConnection.cs</Link>
</Compile>
<Compile Include="..\Microsoft.AspNet.SignalR.Hosting.AspNet.Samples\Streaming\StreamingConnection.cs">
<Link>Streaming\StreamingConnection.cs</Link>
</Compile>
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
Expand All @@ -256,8 +259,19 @@
<Compile Include="Hubs\Chat\ContentProviders\IContentProvider.cs" />
<Compile Include="Hubs\Chat\ContentProviders\ImageContentProvider.cs" />
<Compile Include="Hubs\Chat\ContentProviders\YouTubeContentProvider.cs" />
<Compile Include="Hubs\ConnectDisconnect\Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Hubs\ConnectDisconnect\Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Streaming\Streaming.cs" />
<Compile Include="Streaming\Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Streaming\Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="packages.config">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<%@ Page Title="ASP.NET SignalR: Simple Streaming" Language="C#" MasterPageFile="~/SignalR.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Microsoft.AspNet.SignalR.Samples.Streaming.Default" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<ul class="breadcrumb">
<li><a href="<%: ResolveUrl("~/") %>">SignalR Samples</a> <span class="divider">/</span></li>
<li class="active">Simple Streaming</li>
</ul>

<div class="page-header">
<h2>Simple Streaming <small>Broadcasting to connected clients</small></h2>
<p>A simple example of a background thread that broadcasts the server time to all connected clients every two seconds.</p>
</div>

<h4>Streaming Messages</h4>
<ul id="messages">
</ul>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Scripts" runat="server">
<script>
$(function () {
var connection = $.connection('/streaming-connection');
connection.received(function (data) {
$('#messages').append('<li>' + data + '</li>');
});
connection.start({ transport: activeTransport });
});
</script>
</asp:Content>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Microsoft.AspNet.SignalR.Samples.Streaming
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

0 comments on commit 667d423

Please sign in to comment.