Permalink
Browse files

Updating aspnet 4.5 sample files

Also updating the 4.0's pkg references
  • Loading branch information...
1 parent c18e24d commit dd6fbd62237e587feabb54dc799836a77a679775 @loudej loudej committed Sep 13, 2012
Showing with 795 additions and 406 deletions.
  1. +77 −40 SignalR45.sln
  2. +12 −0 samples/SignalR.Hosting.AspNet.Samples/SignalR.Hosting.AspNet.Samples.csproj
  3. +3 −0 samples/SignalR.Hosting.AspNet.Samples/packages.config
  4. +0 −40 samples/SignalR.Hosting.AspNet45.Samples/Default.aspx
  5. +0 −12 samples/SignalR.Hosting.AspNet45.Samples/Default.aspx.cs
  6. +0 −17 samples/SignalR.Hosting.AspNet45.Samples/Default.aspx.designer.cs
  7. +3 −0 samples/SignalR.Hosting.AspNet45.Samples/Global.asax.cs
  8. +6 −6 samples/SignalR.Hosting.AspNet45.Samples/Hubs/Benchmark/Benchmark.js
  9. +28 −28 samples/SignalR.Hosting.AspNet45.Samples/Hubs/Chat/Chat.js
  10. +4 −5 samples/SignalR.Hosting.AspNet45.Samples/Hubs/ConnectDisconnect/Status.js
  11. +35 −26 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DemoHub/DemoHub.js
  12. +0 −2 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DemoHub/crossdomain.htm
  13. +4 −0 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DemoHub/index.htm
  14. +1 −4 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DrawingPad/drawingpad.js
  15. +7 −8 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DrawingPad/index.htm
  16. +18 −15 samples/SignalR.Hosting.AspNet45.Samples/Hubs/MouseTracking/MouseTracking.js
  17. +1 −1 samples/SignalR.Hosting.AspNet45.Samples/Hubs/MouseTracking/index.htm
  18. +18 −18 samples/SignalR.Hosting.AspNet45.Samples/Hubs/ShapeShare/ShapeShare.js
  19. +3 −3 samples/SignalR.Hosting.AspNet45.Samples/Hubs/ShapeShare/index.htm
  20. +7 −7 samples/SignalR.Hosting.AspNet45.Samples/Raw/crossdomain.htm
  21. +77 −0 samples/SignalR.Hosting.AspNet45.Samples/Raw/eventSource.html
  22. +2 −1 samples/SignalR.Hosting.AspNet45.Samples/Raw/index.htm
  23. +60 −0 samples/SignalR.Hosting.AspNet45.Samples/Raw/test/connect-reconnect.htm
  24. +21 −2 samples/SignalR.Hosting.AspNet45.Samples/Raw/test/sending.htm
  25. +300 −0 samples/SignalR.Hosting.AspNet45.Samples/Scripts/hubs.js
  26. +2 −1 samples/SignalR.Hosting.AspNet45.Samples/Scripts/signalr.samples.js
  27. +23 −36 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Hosting.AspNet.Samples.csproj
  28. +0 −32 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Master
  29. +0 −12 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Master.cs
  30. +0 −35 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Master.designer.cs
  31. +0 −8 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Samples.master
  32. +0 −12 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Samples.master.cs
  33. +0 −35 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Samples.master.designer.cs
  34. +79 −0 samples/SignalR.Hosting.AspNet45.Samples/index.htm
  35. +4 −0 samples/SignalR.Hosting.AspNet45.Samples/packages.config
View
117 SignalR45.sln
@@ -20,6 +20,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalR.Hosting.Self.Sample
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalR.Client.JS", "SignalR.Client.JS\SignalR.Client.JS.csproj", "{69771AF9-1BEE-48E6-98BC-78864231E239}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalR.Server", "SignalR.Server\SignalR.Server.csproj", "{2B8C6DAD-4D85-41B1-83FD-248D9F347522}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalR.Server.Routing", "SignalR.Server.Routing\SignalR.Server.Routing.csproj", "{37C04B69-0989-458A-B80C-A1ED574ADBE4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalR.Hosting.Console.Samples", "samples\SignalR.Hosting.Console45.Samples\SignalR.Hosting.Console.Samples.csproj", "{A84016F2-1B7E-4668-A981-80044D7DCFEF}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -30,16 +36,16 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Any CPU.Build.0 = Release|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|x86.ActiveCfg = Release|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|x86.ActiveCfg = Release|Any CPU
{1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -50,16 +56,6 @@ Global
{1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|x86.ActiveCfg = Release|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Any CPU.Build.0 = Release|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|x86.ActiveCfg = Release|Any CPU
{3B71F0AE-D4B6-4F47-BF62-333D45615673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B71F0AE-D4B6-4F47-BF62-333D45615673}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B71F0AE-D4B6-4F47-BF62-333D45615673}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -70,26 +66,26 @@ Global
{3B71F0AE-D4B6-4F47-BF62-333D45615673}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3B71F0AE-D4B6-4F47-BF62-333D45615673}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3B71F0AE-D4B6-4F47-BF62-333D45615673}.Release|x86.ActiveCfg = Release|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|x86.ActiveCfg = Debug|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Any CPU.Build.0 = Release|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|x86.ActiveCfg = Release|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Debug|x86.ActiveCfg = Debug|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Any CPU.Build.0 = Release|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {6F53F576-0E35-4E89-8D4D-B6B40084A16C}.Release|x86.ActiveCfg = Release|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82}.Release|x86.ActiveCfg = Release|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {1617158B-2CFD-4354-A33F-9937E508D69A}.Release|x86.ActiveCfg = Release|Any CPU
{8FD9E25A-2268-4F6E-85F3-B83DC018ECE9}.Debug|Any CPU.ActiveCfg = Debug|x86
{8FD9E25A-2268-4F6E-85F3-B83DC018ECE9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{8FD9E25A-2268-4F6E-85F3-B83DC018ECE9}.Debug|Mixed Platforms.Build.0 = Debug|x86
@@ -100,12 +96,53 @@ Global
{8FD9E25A-2268-4F6E-85F3-B83DC018ECE9}.Release|Mixed Platforms.Build.0 = Release|x86
{8FD9E25A-2268-4F6E-85F3-B83DC018ECE9}.Release|x86.ActiveCfg = Release|x86
{8FD9E25A-2268-4F6E-85F3-B83DC018ECE9}.Release|x86.Build.0 = Release|x86
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Any CPU.Build.0 = Release|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {69771AF9-1BEE-48E6-98BC-78864231E239}.Release|x86.ActiveCfg = Release|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|x86.ActiveCfg = Release|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {37C04B69-0989-458A-B80C-A1ED574ADBE4}.Release|x86.ActiveCfg = Release|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1EA34A62-E03E-45CF-A9C9-82D2DA0FCD82} = {A7D75EA8-1439-4D57-9B88-EC60842B5FB3}
{8FD9E25A-2268-4F6E-85F3-B83DC018ECE9} = {A7D75EA8-1439-4D57-9B88-EC60842B5FB3}
+ {A84016F2-1B7E-4668-A981-80044D7DCFEF} = {A7D75EA8-1439-4D57-9B88-EC60842B5FB3}
EndGlobalSection
EndGlobal
View
12 samples/SignalR.Hosting.AspNet.Samples/SignalR.Hosting.AspNet.Samples.csproj
@@ -47,7 +47,19 @@
<Reference Include="HtmlSanitizationLibrary">
<HintPath>..\..\packages\AntiXSS.4.0.1\lib\net35\HtmlSanitizationLibrary.dll</HintPath>
</Reference>
+ <Reference Include="Microsoft.AspNet.Owin, Version=0.7.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\packages\Microsoft.AspNet.Owin.0.7\lib\Microsoft.AspNet.Owin.dll</HintPath>
+ </Reference>
<Reference Include="Microsoft.CSharp" />
+ <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
+ </Reference>
+ <Reference Include="Owin.Startup, Version=0.4.0.0, Culture=neutral, PublicKeyToken=f585506a2da1fef4, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\packages\Owin.Startup.0.4\lib\net40\Owin.Startup.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Web" />
View
3 samples/SignalR.Hosting.AspNet.Samples/packages.config
@@ -10,5 +10,8 @@
<package id="jQuery.Templates" version="0.1" />
<package id="jQuery.UI.Combined" version="1.8.13" />
<package id="json2" version="1.0" />
+ <package id="Microsoft.AspNet.Owin" version="0.7" targetFramework="net40" />
+ <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
<package id="Newtonsoft.Json" version="4.5.4" />
+ <package id="Owin.Startup" version="0.4" targetFramework="net40" />
</packages>
View
40 samples/SignalR.Hosting.AspNet45.Samples/Default.aspx
@@ -1,40 +0,0 @@
-<%@ Page Title="SignalR Samples" Language="C#" MasterPageFile="~/SignalR.Samples.master" AutoEventWireup="true"
- CodeBehind="Default.aspx.cs" Inherits="SignalR.Samples._Default" %>
-
-<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
-</asp:Content>
-<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
-
- <div id="home">
- <ul>
- <li class="raw"><a href="Raw/"><p class="title">Raw Connection</p></a></li>
- <li class="streaming"><a href="Streaming/"><p class="title">Streaming</p></a></li>
- <li class="demo-hub"><a href="Hubs/DemoHub/"><p class="title">Demo Hub</p></a></li>
- <li class="status"><a href="Hubs/ConnectDisconnect/"><p class="title">Connection Status</p></a></li>
- <li class="chat"><a href="Hubs/Chat/"><p class="title">Chat</p></a></li>
- <li class="mouse-tracking"><a href="Hubs/MouseTracking/"><p class="title">Mouse Tracking</p></a></li>
- <li class="drawing-pad"><a href="Hubs/DrawingPad"><p class="title">Drawing pad</p></a></li>
- <li class="shape-share"><a href="Hubs/ShapeShare/"><p class="title">Shape Share</p></a></li>
- <li class="hub-bench"><a href="Hubs/Benchmark/"><p class="title">Hub Ping</p></a></li>
- </ul>
- </div>
- <div class="clear"></div>
- <script src="Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
- <script src="Scripts/jquery.color.js" type="text/javascript"></script>
- <script src="Scripts/jquery.transform.js" type="text/javascript"></script>
- <script src="Scripts/jquery.easing.1.3.js" type="text/javascript"></script>
- <script src="Scripts/jquery.hoverMorph.js" type="text/javascript"></script>
- <script>
- $(function () {
- $("#home li").hoverMorph()
- .click(function (e) {
- if (e.target.tagName.toLowerCase() !== "a") {
- document.location = $(this).find("a").attr("href");
- }
- })
- .css({
- cursor: "pointer"
- });
- });
- </script>
-</asp:Content>
View
12 samples/SignalR.Hosting.AspNet45.Samples/Default.aspx.cs
@@ -1,12 +0,0 @@
-using System;
-
-namespace SignalR.Samples
-{
- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
-
- }
- }
-}
View
17 samples/SignalR.Hosting.AspNet45.Samples/Default.aspx.designer.cs
@@ -1,17 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace SignalR.Samples
-{
-
-
- public partial class _Default
- {
- }
-}
View
3 samples/SignalR.Hosting.AspNet45.Samples/Global.asax.cs
@@ -5,6 +5,7 @@
using SignalR.Samples.Hubs.DemoHub;
using SignalR.Samples.Raw;
using SignalR.Samples.Streaming;
+using SignalR.Server;
namespace SignalR.Hosting.AspNet.Samples
{
@@ -32,6 +33,8 @@ protected void Application_Start(object sender, EventArgs e)
}
});
+ RouteTable.Routes.MapHubs();
+
RouteTable.Routes.MapConnection<SendingConnection>("sending-connection", "sending-connection/{*operation}");
RouteTable.Routes.MapConnection<TestConnection>("test-connection", "test-connection/{*operation}");
RouteTable.Routes.MapConnection<Raw>("raw", "raw/{*operation}");
View
12 samples/SignalR.Hosting.AspNet45.Samples/Hubs/Benchmark/Benchmark.js
@@ -13,12 +13,12 @@ $(function () {
countOne = 0,
countAll = 0;
- bench.stepOne = function (ndx) {
+ bench.client.stepOne = function (ndx) {
delete idSet[ndx + ""];
++countOne;
};
- bench.doneOne = function (start, expected) {
+ bench.client.doneOne = function (start, expected) {
var duration = new Date().getTime() - start;
var $msg = log(countOne + " in " + duration + "ms");
var theCount = countOne;
@@ -33,12 +33,12 @@ $(function () {
};
- bench.stepAll = function (ndx) {
+ bench.client.stepAll = function (ndx) {
delete idSet[ndx + ""];
++countAll;
};
- bench.doneAll = function (start, expected, numConnections, connectionId) {
+ bench.client.doneAll = function (start, expected, numConnections, connectionId) {
var duration = new Date().getTime() - start;
var $msg = log(countAll + " in " + duration + "ms. " + numConnections + " connections");
var theCount = countAll;
@@ -69,14 +69,14 @@ $(function () {
var numCalls = parseInt($("#clientCalls").val());
initSet(numCalls);
var now = new Date().getTime();
- bench.hitMe(now, numCalls, $.connection.hub.id);
+ bench.server.hitMe(now, numCalls, $.connection.hub.id);
});
//benchmark messages to all clients
$("#hitus").click(function () {
var numCalls = parseInt($("#clientCalls").val());
initSet(numCalls);
var now = new Date().getTime();
- bench.hitUs(now, numCalls);
+ bench.server.hitUs(now, numCalls);
});
});
View
56 samples/SignalR.Hosting.AspNet45.Samples/Hubs/Chat/Chat.js
@@ -35,14 +35,14 @@ $(function () {
return e;
}
- chat.refreshRoom = function (room) {
+ chat.client.refreshRoom = function (room) {
clearMessages();
clearUsers();
- chat.getUsers()
+ chat.server.getUsers()
.done(function (users) {
$.each(users, function () {
- chat.addUser(this, true);
+ chat.client.addUser(this, true);
});
refreshUsers();
@@ -52,7 +52,7 @@ $(function () {
addMessage('Entered ' + room, 'notification');
};
- chat.showRooms = function (rooms) {
+ chat.client.showRooms = function (rooms) {
if (!rooms.length) {
addMessage('No rooms available', 'notification');
}
@@ -63,14 +63,14 @@ $(function () {
}
};
- chat.addMessageContent = function (id, content) {
+ chat.client.addMessageContent = function (id, content) {
var e = $('#m-' + id).append(content);
refreshMessages();
updateUnread();
e[0].scrollIntoView();
};
- chat.addMessage = function (id, name, message) {
+ chat.client.addMessage = function (id, name, message) {
var data = {
name: name,
message: message,
@@ -84,7 +84,7 @@ $(function () {
e[0].scrollIntoView();
};
- chat.addUser = function (user, exists) {
+ chat.client.addUser = function (user, exists) {
var id = 'u-' + user.Name;
if (document.getElementById(id)) {
return;
@@ -99,15 +99,15 @@ $(function () {
.appendTo($('#users'));
refreshUsers();
- if (!exists && this.name != user.Name) {
- addMessage(user.Name + ' just entered ' + this.room, 'notification');
+ if (!exists && this.state.name != user.Name) {
+ addMessage(user.Name + ' just entered ' + this.state.room, 'notification');
e.hide().fadeIn('slow');
}
updateCookie();
};
- chat.changeUserName = function (oldUser, newUser) {
+ chat.client.changeUserName = function (oldUser, newUser) {
$('#u-' + oldUser.Name).replaceWith(
$('#new-user-template').tmpl({
name: newUser.Name,
@@ -116,7 +116,7 @@ $(function () {
);
refreshUsers();
- if (newUser.Name === this.name) {
+ if (newUser.Name === this.state.name) {
addMessage('Your name is now ' + newUser.Name, 'notification');
updateCookie();
}
@@ -125,28 +125,28 @@ $(function () {
}
};
- chat.sendMeMessage = function (name, message) {
+ chat.client.sendMeMessage = function (name, message) {
addMessage('*' + name + '* ' + message, 'notification');
};
- chat.sendPrivateMessage = function (from, to, message) {
+ chat.client.sendPrivateMessage = function (from, to, message) {
addMessage('<emp>*' + from + '*</emp> ' + message, 'pm');
};
- chat.leave = function (user) {
- if (this.id != user.Id) {
+ chat.client.leave = function (user) {
+ if (this.state.id != user.Id) {
$('#u-' + user.Name).fadeOut('slow', function () {
$(this).remove();
});
- addMessage(user.Name + ' left ' + this.room, 'notification');
+ addMessage(user.Name + ' left ' + this.state.room, 'notification');
}
};
$('#send-message').submit(function () {
var command = $('#new-message').val();
- chat.send(command)
+ chat.server.send(command)
.fail(function (e) {
addMessage(e, 'error');
});
@@ -158,36 +158,36 @@ $(function () {
});
$(window).blur(function () {
- chat.focus = false;
+ chat.state.focus = false;
});
$(window).focus(function () {
- chat.focus = true;
- chat.unread = 0;
+ chat.state.focus = true;
+ chat.state.unread = 0;
document.title = 'SignalR Chat';
});
function updateUnread() {
- if (!chat.focus) {
- if (!chat.unread) {
- chat.unread = 0;
+ if (!chat.state.focus) {
+ if (!chat.state.unread) {
+ chat.state.unread = 0;
}
- chat.unread++;
+ chat.state.unread++;
}
updateTitle();
}
function updateTitle() {
- if (chat.unread == 0) {
+ if (chat.state.unread == 0) {
document.title = 'SignalR Chat';
}
else {
- document.title = 'SignalR Chat (' + chat.unread + ')';
+ document.title = 'SignalR Chat (' + chat.state.unread + ')';
}
}
function updateCookie() {
- $.cookie('userid', chat.id, { path: '/', expires: 30 });
+ $.cookie('userid', chat.state.id, { path: '/', expires: 30 });
}
addMessage('Welcome to the SignalR IRC clone', 'notification');
@@ -196,7 +196,7 @@ $(function () {
$('#new-message').focus();
$.connection.hub.start({ transport: activeTransport }, function () {
- chat.join()
+ chat.server.join()
.done(function (success) {
if (success === false) {
$.cookie('userid', '');
View
9 samples/SignalR.Hosting.AspNet45.Samples/Hubs/ConnectDisconnect/Status.js
@@ -1,19 +1,19 @@
$(function () {
- var status = $.connection.status;
+ var status = $.connection.StatusHub;
- status.joined = function (id, when) {
+ status.client.joined = function (id, when) {
if ($.connection.hub.id === id) {
addMessage(id, 'blue');
}
addMessage(id + ' joined at ' + when, 'green');
};
- status.rejoined = function (id, when) {
+ status.client.rejoined = function (id, when) {
addMessage(id + ' reconnected at ' + when, 'purple');
};
- status.leave = function (id, when) {
+ status.client.leave = function (id, when) {
addMessage(id + ' left at ' + when, 'red');
};
@@ -22,5 +22,4 @@ $(function () {
}
$.connection.hub.start({ transport: activeTransport });
-
});
View
61 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DemoHub/DemoHub.js
@@ -2,35 +2,42 @@
var demo = $.connection.demo,
groupAddedCalled = false;
- demo.invoke = function (index) {
- $('#msg').append('<li>' + index + ' client state index ->' + this.index + '</li>');
+ demo.client.invoke = function (index) {
+ $('#msg').append('<li>' + index + ' client state index ->' + this.state.index + '</li>');
};
- demo.signal = function (id) {
+ demo.on('signal', function (id) {
$('#dynamicTask').html('The dynamic task! ' + id);
- };
+ });
- demo.fromArbitraryCode = function (value) {
+ demo.client.fromArbitraryCode = function (value) {
$('#arbitraryCode').html('Sending ' + value + ' from arbitrary code without the hub itself!');
};
- demo.groupAdded = function () {
+ demo.client.groupAdded = function () {
if (groupAddedCalled) {
throw Error("groupAdded already called!");
}
$('#groupAdded').append('Group Added');
groupAddedCalled = true;
};
- demo.errorInCallback = function () {
+ demo.client.errorInCallback = function () {
var o = null;
o.doIt();
};
- $.connection.hub.start(options, function () {
- demo.doSomethingAndCallError();
+ demo.client.clientMethod = function () {
+ throw new "This should never called because it's mispelled on the server side";
+ };
+
+ $.connection.hub.logging = true;
- demo.getValue(function (value) {
+ $.connection.hub.start(function () {
+
+ demo.server.doSomethingAndCallError();
+
+ demo.server.getValue(function (value) {
$('#value').html('The value is ' + value + ' after 5 seconds');
});
@@ -40,59 +47,61 @@
Address: { Street: "One Microsoft Way", Zip: "98052" }
};
- demo.complexType(p, function () {
- $('#value').html('Complex Type ->' + window.JSON.stringify(this.person));
+ demo.server.complexType(p, function () {
+ $('#complexType').html('Complex Type ->' + window.JSON.stringify(this.state.person));
});
- demo.multipleCalls();
+ demo.server.multipleCalls();
- demo.simpleArray([5, 5, 6]).done(function () {
+ demo.server.simpleArray([5, 5, 6]).done(function () {
$('#simpleArray').html('Simple array works!');
});
- demo.complexArray([p, p, p]).done(function () {
+ demo.server.complexArray([p, p, p]).done(function () {
$('#complexArray').html('Complex array works!');
});
- demo.dynamicTask().fail(function () {
+ demo.server.dynamicTask().fail(function () {
$('#dynamicTask').html('The dynamic task failed :(');
});
- demo.plainTask().done(function () {
+ demo.server.plainTask().done(function () {
$('#plainTask').html('Plain Task Result');
});
- demo.passingDynamicComplex(p).done(function (age) {
+ demo.server.passingDynamicComplex(p).done(function (age) {
$('#passingDynamicComplex').html('The person\'s age is ' + age);
});
- demo.genericTaskTypedAsPlain().done(function (result) {
+ demo.server.genericTaskTypedAsPlain().done(function (result) {
$('#genericTaskTypedAsPlain').html(result);
});
- demo.taskWithException().fail(function (e) {
+ demo.server.taskWithException().fail(function (e) {
$('#taskWithException').html(e);
});
- demo.genericTaskWithException().fail(function (e) {
+ demo.server.genericTaskWithException().fail(function (e) {
$('#genericTaskWithException').html(e);
});
- demo.overload().done(function () {
+ demo.server.overload().done(function () {
$('#overloads').html('Void Overload called');
window.setTimeout(function () {
- demo.overload(1).done(function (n) {
+ demo.server.overload(1).done(function (n) {
$('#overloads').html('Overload with return value called =>' + n);
});
}, 1000);
});
- demo.addToGroups();
+ demo.server.addToGroups();
- demo.name = 'Testing state!';
- demo.readStateValue().done(function (name) {
+ demo.state.name = 'Testing state!';
+ demo.server.readStateValue().done(function (name) {
$('#readStateValue').html('Read some state! => ' + name);
});
+
+ demo.server.mispelledClientMethod();
});
});
View
2 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DemoHub/crossdomain.htm
@@ -9,8 +9,6 @@
<script src="../../Scripts/jquery.signalR.js" type="text/javascript"></script>
<script src="http://localhost:8081/signalr/hubs" type="text/javascript"></script>
<script type="text/javascript">
- var options = { jsonp: true };
-
$.connection.hub.url = 'http://localhost:8081/signalr';
</script>
<script src="DemoHub.js" type="text/javascript"></script>
View
4 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DemoHub/index.htm
@@ -46,6 +46,10 @@
<div id="simpleArray">
</div>
+ <h3>ComplexType</h3>
+ <div id="complexType">
+ </div>
+
<h3>ComplexArray</h3>
<div id="complexArray">
</div>
View
5 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DrawingPad/drawingpad.js
@@ -24,7 +24,6 @@
if (e.which === 1 && !leftButtonDown) e.which = 0;
}
-
var methods = {
init: function (options) {
@@ -89,7 +88,7 @@
X: data.coords.X,
Y: data.coords.Y
},
- Color : settings.linecolor
+ Color: settings.linecolor
});
}
@@ -131,8 +130,6 @@
}
};
-
-
$.fn.drawingpad = function (method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
View
15 samples/SignalR.Hosting.AspNet45.Samples/Hubs/DrawingPad/index.htm
@@ -32,26 +32,25 @@
var id = -1;
// someone draw something
- signalR.drawingPad.lineDrawed = function (senderId, value) {
+ signalR.DrawingPad.client.lineDrawed = function (senderId, value) {
if (senderId != id) { // Do not redraw own data, in order to avoid infinit loop
value.Callback = true;
$("#pad").drawingpad("line", value);
}
};
signalR.hub.start({ transport: activeTransport }, function () {
-
- signalR.drawingPad.join(function () {
+ signalR.DrawingPad.server.join(function () {
$("#connecting").hide();
$("#connected").show();
- id = signalR.drawingPad.id;
- color = signalR.drawingPad.color;
+ id = signalR.DrawingPad.state.id;
+ color = signalR.DrawingPad.state.color;
// Listen for drawing
- $("#pad").drawingpad({linecolor : color}).bind('line.drawingpad', function (event, args) {
- if(!args.Callback)
- signalR.drawingPad.drawLine(args);
+ $("#pad").drawingpad({ linecolor: color }).bind('line.drawingpad', function (event, args) {
+ if (!args.Callback)
+ signalR.DrawingPad.server.DrawALine(args);
});
});
});
View
33 samples/SignalR.Hosting.AspNet45.Samples/Hubs/MouseTracking/MouseTracking.js
@@ -1,13 +1,17 @@
-$(function () {
- // Pure client side hub
- var signalR = $.connection;
- signalR.mouseTracking.moveMouse = function (id, x, y) {
- if (id == this.id) {
+/// <reference path="../../Scripts/jquery-1.6.2.js" />
+/// <reference path="../../Scripts/jquery.signalR.js" />
+
+$(function () {
+ var hubConnection = $.hubConnection('/signalr', { qs: 'test=1', logging: false, useDefaultPath: false }),
+ hub = hubConnection.createProxy('mouseTracking');
+
+ hub.on('MoveMouse', function (id, x, y) {
+ if (id == this.state.id) {
return;
}
updateCursor(id, x, y);
- };
+ });
function updateCursor(id, x, y) {
var e = document.getElementById(id);
@@ -18,18 +22,17 @@
else {
e = $(e);
}
- e.css('left', x);
- e.css('top', y);
+ e.css({ left: x, top: y });
}
-
- signalR.hub.start({ transport: activeTransport }, function () {
- signalR.mouseTracking.join(function () {
-
+ hubConnection.start({ transport: activeTransport })
+ .done(function () {
+ return hub.invoke('join');
+ })
+ .done(function () {
$(document).mousemove(function (e) {
- signalR.mouseTracking.move(e.pageX, e.pageY);
- updateCursor(signalR.mouseTracking.id, e.pageX, e.pageY);
+ hub.invoke('Move', e.pageX, e.pageY);
+ updateCursor(hub.state.id, e.pageX, e.pageY);
});
});
- });
});
View
2 samples/SignalR.Hosting.AspNet45.Samples/Hubs/MouseTracking/index.htm
@@ -8,7 +8,7 @@
<script src="../../Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="../../Scripts/json2.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.signalR.js" type="text/javascript"></script>
- <script src="../../signalr/hubs" type="text/javascript"></script>
+ <!--<script src="../../signalr/hubs" type="text/javascript"></script>-->
<script src="MouseTracking.js" type="text/javascript"></script>
</head>
<body>
View
36 samples/SignalR.Hosting.AspNet45.Samples/Hubs/ShapeShare/ShapeShare.js
@@ -10,7 +10,7 @@ $(function () {
var shapeShare = $.connection.shapeShare;
function changeShape(el) {
- shapeShare.changeShape($(el).data("shapeId"), el.offsetLeft, el.offsetTop || 0, el.clientWidth, el.clientHeight);
+ shapeShare.server.changeShape($(el).data("shapeId"), el.offsetLeft, el.offsetTop || 0, el.clientWidth, el.clientHeight);
}
function makeShape(shape) {
@@ -41,11 +41,11 @@ $(function () {
.addClass(shape.Type)
.attr("id", "s-" + shape.ID)
.data("shapeId", shape.ID)
- .append("<div class='user-info' id='u-" + shape.ID + "'>" + (shapeShare.user.Name === shape.ChangedBy.Name ? "" : "changed by " + shape.ChangedBy.Name) + "</div>");
+ .append("<div class='user-info' id='u-" + shape.ID + "'>" + (shapeShare.state.user.Name === shape.ChangedBy.Name ? "" : "changed by " + shape.ChangedBy.Name) + "</div>");
return el;
}
- shapeShare.shapeAdded = function (shape) {
+ shapeShare.client.shapeAdded = function (shape) {
makeShape(shape)
.hide()
.appendTo("#shapes")
@@ -72,8 +72,8 @@ $(function () {
.fadeIn();
};
- shapeShare.shapeChanged = function (shape) {
- if (this.user.ID === shape.ChangedBy.ID) {
+ shapeShare.client.shapeChanged = function (shape) {
+ if (this.state.user.ID === shape.ChangedBy.ID) {
$("#u-" + shape.ID).text("");
return;
}
@@ -89,23 +89,23 @@ $(function () {
.text("changed by " + shape.ChangedBy.Name);
};
- shapeShare.shapeDeleted = function (id) {
+ shapeShare.client.shapeDeleted = function (id) {
$("#s-" + id).fadeOut(250, function () {
$(this).remove();
});
};
- shapeShare.shapesDeleted = function (shapes) {
+ shapeShare.client.shapesDeleted = function (shapes) {
$.each(shapes, function () {
- shapeShare.shapeDeleted(this.id);
+ shapeShare.client.shapeDeleted(this.id);
});
};
$('#toolbar')
.delegate("menu[label=add] a", "click", function (e) {
e.preventDefault();
- shapeShare.createShape(this.className.toLowerCase());
+ shapeShare.server.createShape(this.className.toLowerCase());
// switch (this.className.toLowerCase()) {
// case "square":
@@ -120,29 +120,29 @@ $(function () {
})
.delegate("a.delete", "click", function (e) {
e.preventDefault();
- shapeShare.deleteAllShapes();
+ shapeShare.server.deleteAllShapes();
return false;
});
$("#user").change(function () {
- shapeShare.changeUserName(shapeShare.user.Name, $(this).val(), function () {
- $.cookie("userName", shapeShare.user.Name, { expires: 30 })
- $("#user").val(shapeShare.user.Name);
+ shapeShare.server.changeUserName(shapeShare.state.user.Name, $(this).val(), function () {
+ $.cookie("userName", shapeShare.state.user.Name, { expires: 30 })
+ $("#user").val(shapeShare.state.user.Name);
});
});
function load() {
- shapeShare.getShapes(function (shapes) {
+ shapeShare.server.getShapes(function (shapes) {
$.each(shapes, function () {
- shapeShare.shapeAdded(this);
+ shapeShare.server.shapeAdded(this);
});
});
}
$.connection.hub.start({ transport: activeTransport }, function () {
- shapeShare.join($.cookie("userName"), function () {
- $.cookie("userName", shapeShare.user.Name, { expires: 30 });
- $("#user").val(shapeShare.user.Name);
+ shapeShare.server.join($.cookie("userName"), function () {
+ $.cookie("userName", shapeShare.state.user.Name, { expires: 30 });
+ $("#user").val(shapeShare.state.user.Name);
load();
});
});
View
6 samples/SignalR.Hosting.AspNet45.Samples/Hubs/ShapeShare/index.htm
@@ -35,13 +35,13 @@
<a href="#" class="delete" title="delete all shapes">D</a>
</li>
<li>
- <label for="user">User: </label><input id="user" type="text" value="" />
+ <label for="user">User: </label>
+ <input id="user" type="text" value="" />
</li>
</menu>
<ul id="shapes">
-
</ul>
</div>
</body>
-</html>
+</html>
View
14 samples/SignalR.Hosting.AspNet45.Samples/Raw/crossdomain.htm
@@ -46,25 +46,25 @@
.appendTo($("#messages"));
});
- connection.stateChanged(function (state) {
- var old = null,
+ connection.stateChanged(function (change) {
+ var oldState = null,
newState = null;
for (var p in $.signalR.connectionState) {
- if ($.signalR.connectionState[p] === connection.state) {
- old = p;
+ if ($.signalR.connectionState[p] === change.oldState) {
+ oldState = p;
}
- if ($.signalR.connectionState[p] === state) {
+ if ($.signalR.connectionState[p] === change.newState) {
newState = p;
}
}
- $("<li/>").html(old + " => " + newState)
+ $("<li/>").html(oldState + " => " + newState)
.appendTo($("#messages"));
});
var start = function () {
- connection.start()
+ connection.start({ transport: activeTransport, jsonp: isJsonp })
.then(function () {
$("#stopStart").prop("disabled", false);
});
View
77 samples/SignalR.Hosting.AspNet45.Samples/Raw/eventSource.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Event Source Tests</title>
+ <style>
+ body {
+ font-family: Arial;
+ }
+
+ p {
+ margin: 0;
+ }
+
+ .open {
+ color: #08a41c;
+ }
+
+ .err {
+ color: #f00;
+ }
+ </style>
+</head>
+<body>
+ <div id="log"></div>
+
+ <script src="../Scripts/jquery-1.6.2.js"></script>
+ <script src="../Scripts/jquery.signalR.js"></script>
+ <script>
+ $(function () {
+ var connection = $.connection("Raw/Raw", null, true),
+ $log = $("#log");
+
+ function log(cat, msg) {
+ if (!msg) {
+ msg = cat;
+ cat = "";
+ }
+ $log.append("<p class='" + cat + "'>" + msg + "</p>");
+ }
+
+ function getReadyState(id) {
+ if (id === window.EventSource.CONNECTING) {
+ return "CONNECTING (" + id + ")";
+ } else if (id === window.EventSource.OPEN) {
+ return "OPEN (" + id + ")";
+ } else if (id === window.EventSource.CLOSED) {
+ return "CLOSED (" + id + ")";
+ }
+ }
+
+ function onStart() {
+ // http://localhost:40476/Raw/Raw/Raw/connect?transport=serverSentEvents&connectionId=8bdaa3a5-975a-4826-bd06-26ea7d51c026
+ var url = connection.url + "?transport=serverSentEvents&connectionId=" + connection.id + "&bogus=true",
+ es;
+
+ //window.setTimeout(function() { connection.stop(); }, 100);
+
+ log("EventSource url: " + url);
+
+ es = new window.EventSource(url);
+ es.addEventListener("open", function (e) {
+ log("open", "EventSource: opened, readyState=" + getReadyState(es.readyState));
+ });
+ es.addEventListener("message", function (e) {
+ log("messge", "EventSource: message, " +
+ (e.data === "initialized" ? e.data : "timedOut=" + window.JSON.parse(e.data).TimedOut));
+ });
+ es.addEventListener("error", function (e) {
+ log("err", "EventSource: error, eventPhase=" + getReadyState(e.eventPhase) + ", readyState=" + getReadyState(es.readyState));
+ });
+ }
+
+ connection.start().done(onStart);
+ });
+ </script>
+</body>
+</html>
View
3 samples/SignalR.Hosting.AspNet45.Samples/Raw/index.htm
@@ -69,7 +69,7 @@
});
var start = function () {
- connection.start({ transport: activeTransport })
+ connection.start({ transport: activeTransport, jsonp: isJsonp })
.then(function () {
$("#stopStart").val("Stop").prop("disabled", false);
});
@@ -117,6 +117,7 @@
</script>
</head>
<body>
+ <a href="crossdomain.htm">Cross Domain</a>
<h2>
To Everybody</h2>
<form>
View
60 samples/SignalR.Hosting.AspNet45.Samples/Raw/test/connect-reconnect.htm
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
+ <title>SignalR Raw Connection Sample</title>
+ <style type="text/css">
+ body {
+ font-family: "Segoe UI";
+ font-size: 12px;
+ }
+ form {
+ margin-bottom: 10px;
+ display: block;
+ }
+ label {
+ display: block;
+ }
+ </style>
+ <link rel="Stylesheet" href="http://code.jquery.com/qunit/qunit-git.css" />
+ <script src="../../Scripts/signalr.samples.js" type="text/javascript"></script>
+ <script src="../../Scripts/jquery-1.6.2.min.js"></script>
+ <script src="../../Scripts/jquery.cookie.js" type="text/javascript"></script>
+ <script src="../../Scripts/json2.min.js" type="text/javascript"></script>
+ <script src="../../Scripts/jquery.signalR.js"></script>
+ <script type="text/javascript" src="http://code.jquery.com/qunit/qunit-git.js"></script>
+ <script>
+ $(function () {
+ "use strict";
+
+ asyncTest('start', function () {
+ var connection = $.connection('../../sending-connection', null, true);
+ var messages = [];
+
+ connection.received(function (message) {
+ messages.push(message);
+ });
+
+ connection.reconnected(function () {
+ });
+
+ connection.start({ transport: activeTransport });
+ });
+ });
+ </script>
+</head>
+<body>
+ <h1 id="qunit-header">
+ QUnit example</h1>
+ <h2 id="qunit-banner">
+ </h2>
+ <div id="qunit-testrunner-toolbar">
+ </div>
+ <h2 id="qunit-userAgent">
+ </h2>
+ <ol id="qunit-tests">
+ </ol>
+ <div id="qunit-fixture">
+ test markup, will be hidden</div>
+</body>
+</html>
View
23 samples/SignalR.Hosting.AspNet45.Samples/Raw/test/sending.htm
@@ -34,12 +34,31 @@
messages.push(message);
});
- connection.start({ transport: activeTransport }).done(function () {
+ connection.start({ transport: activeTransport, jsonp: isJsonp }).done(function () {
connection.send('blah');
setTimeout(function () {
start();
- equal(10, messages.length, 'All messages received');
+ equal(messages.length, 10, 'All messages received');
+ }, 5000);
+ });
+ });
+
+ asyncTest('jsonp-same-origin', function () {
+ var connection = $.connection('../../sending-connection', null, true);
+ var messages = [];
+ connection.received(function (message) {
+ messages.push(message);
+ });
+
+ connection.start({ transport: 'longPolling', jsonp: true }).done(function () {
+ connection.send('blah');
+
+ setTimeout(function () {
+ start();
+ for (var i = 0; i < 10; i++) {
+ equal(messages[i], 'blah' + i, 'Message ' + i + ' successfully received', i);
+ }
}, 5000);
});
});
View
300 samples/SignalR.Hosting.AspNet45.Samples/Scripts/hubs.js
@@ -0,0 +1,300 @@
+/*!
+ * SignalR JavaScript Library v0.5.3
+ * http://signalr.net/
+ *
+ * Copyright David Fowler and Damian Edwards 2012
+ * Licensed under the MIT.
+ * https://github.com/SignalR/SignalR/blob/master/LICENSE.md
+ *
+ */
+
+/// <reference path="..\..\SignalR.Client.JS\Scripts\jquery-1.6.2.js" />
+/// <reference path="jquery.signalR.js" />
+(function ($, window) {
+ /// <param name="$" type="jQuery" />
+ "use strict";
+
+ if (typeof ($.signalR) !== "function") {
+ throw "SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/hubs.";
+ }
+
+ var signalR = $.signalR;
+
+ function makeProxyCallback(hub, callback) {
+ return function () {
+ // Call the client hub method
+ callback.apply(hub, $.makeArray(arguments));
+ };
+ }
+
+ function createHubProxies(instance, hubConnection) {
+ var key, hub, memberKey, memberValue, proxy;
+
+ for (key in instance) {
+ if (instance.hasOwnProperty(key)) {
+ hub = instance[key];
+
+ if (!(hub.hubName)) {
+ // Not a client hub
+ continue;
+ }
+
+ // Loop through all members on the hub and find client hub functions to subscribe to
+ for (memberKey in hub.client) {
+ if (hub.client.hasOwnProperty(memberKey)) {
+ memberValue = hub.client[memberKey];
+
+ if (!$.isFunction(memberValue)) {
+ // Not a client hub function
+ continue;
+ }
+
+ // Subscribe to the hub event for this method
+ hub.on(memberKey, makeProxyCallback(hub, memberValue));
+ }
+ }
+ }
+ }
+ }
+
+ signalR.hub = $.hubConnection("/signalr")
+ .starting(function () {
+ createHubProxies(signalR, this);
+ });
+
+ signalR.chat = signalR.hub.createProxy('chat');
+ signalR.chat.client = { };
+ signalR.chat.server = {
+ join: function () {
+ /// <summary>Calls the Join method on the server-side Chat hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.chat.invoke.apply(signalR.chat, $.merge(["Join"], $.makeArray(arguments)));
+ },
+
+ send: function (content) {
+ /// <summary>Calls the Send method on the server-side Chat hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="content" type="String">Server side type is System.String</param>
+ return signalR.chat.invoke.apply(signalR.chat, $.merge(["Send"], $.makeArray(arguments)));
+ },
+
+ getUsers: function () {
+ /// <summary>Calls the GetUsers method on the server-side Chat hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.chat.invoke.apply(signalR.chat, $.merge(["GetUsers"], $.makeArray(arguments)));
+ }
+ };
+
+ signalR.demo = signalR.hub.createProxy('demo');
+ signalR.demo.client = { };
+ signalR.demo.server = {
+ getValue: function () {
+ /// <summary>Calls the GetValue method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["GetValue"], $.makeArray(arguments)));
+ },
+
+ addToGroups: function () {
+ /// <summary>Calls the AddToGroups method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["AddToGroups"], $.makeArray(arguments)));
+ },
+
+ doSomethingAndCallError: function () {
+ /// <summary>Calls the DoSomethingAndCallError method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["DoSomethingAndCallError"], $.makeArray(arguments)));
+ },
+
+ dynamicTask: function () {
+ /// <summary>Calls the DynamicTask method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["DynamicTask"], $.makeArray(arguments)));
+ },
+
+ plainTask: function () {
+ /// <summary>Calls the PlainTask method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["PlainTask"], $.makeArray(arguments)));
+ },
+
+ genericTaskTypedAsPlain: function () {
+ /// <summary>Calls the GenericTaskTypedAsPlain method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["GenericTaskTypedAsPlain"], $.makeArray(arguments)));
+ },
+
+ taskWithException: function () {
+ /// <summary>Calls the TaskWithException method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["TaskWithException"], $.makeArray(arguments)));
+ },
+
+ genericTaskWithException: function () {
+ /// <summary>Calls the GenericTaskWithException method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["GenericTaskWithException"], $.makeArray(arguments)));
+ },
+
+ simpleArray: function (nums) {
+ /// <summary>Calls the SimpleArray method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="nums" type="Object">Server side type is System.Int32[]</param>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["SimpleArray"], $.makeArray(arguments)));
+ },
+
+ readStateValue: function () {
+ /// <summary>Calls the ReadStateValue method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["ReadStateValue"], $.makeArray(arguments)));
+ },
+
+ setStateValue: function (value) {
+ /// <summary>Calls the SetStateValue method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="value" type="String">Server side type is System.String</param>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["SetStateValue"], $.makeArray(arguments)));
+ },
+
+ complexArray: function (people) {
+ /// <summary>Calls the ComplexArray method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="people" type="Object">Server side type is SignalR.Samples.Hubs.DemoHub.DemoHub+Person[]</param>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["ComplexArray"], $.makeArray(arguments)));
+ },
+
+ complexType: function (p) {
+ /// <summary>Calls the ComplexType method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="p" type="Object">Server side type is SignalR.Samples.Hubs.DemoHub.DemoHub+Person</param>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["ComplexType"], $.makeArray(arguments)));
+ },
+
+ passingDynamicComplex: function (p) {
+ /// <summary>Calls the PassingDynamicComplex method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="p" type="Object">Server side type is System.Object</param>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["PassingDynamicComplex"], $.makeArray(arguments)));
+ },
+
+ multipleCalls: function () {
+ /// <summary>Calls the MultipleCalls method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["MultipleCalls"], $.makeArray(arguments)));
+ },
+
+ overload: function () {
+ /// <summary>Calls the Overload method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["Overload"], $.makeArray(arguments)));
+ },
+
+ unsupportedOverload: function (x) {
+ /// <summary>Calls the UnsupportedOverload method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="x" type="String">Server side type is System.String</param>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["UnsupportedOverload"], $.makeArray(arguments)));
+ },
+
+ testGuid: function () {
+ /// <summary>Calls the TestGuid method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["TestGuid"], $.makeArray(arguments)));
+ },
+
+ dynamicInvoke: function (method) {
+ /// <summary>Calls the DynamicInvoke method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="method" type="String">Server side type is System.String</param>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["DynamicInvoke"], $.makeArray(arguments)));
+ },
+
+ mispelledClientMethod: function () {
+ /// <summary>Calls the MispelledClientMethod method on the server-side demo hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.demo.invoke.apply(signalR.demo, $.merge(["MispelledClientMethod"], $.makeArray(arguments)));
+ }
+ };
+
+ signalR.DrawingPad = signalR.hub.createProxy('DrawingPad');
+ signalR.DrawingPad.client = { };
+ signalR.DrawingPad.server = {
+ join: function () {
+ /// <summary>Calls the Join method on the server-side DrawingPad hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.DrawingPad.invoke.apply(signalR.DrawingPad, $.merge(["Join"], $.makeArray(arguments)));
+ },
+
+ DrawALine: function (data) {
+ /// <summary>Calls the DrawALine method on the server-side DrawingPad hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="data" type="Object">Server side type is SignalR.Hosting.AspNet.Samples.Hubs.DrawingPad.DrawingPad+Line</param>
+ return signalR.DrawingPad.invoke.apply(signalR.DrawingPad, $.merge(["DrawALine"], $.makeArray(arguments)));
+ }
+ };
+
+ signalR.hubBench = signalR.hub.createProxy('hubBench');
+ signalR.hubBench.client = { };
+ signalR.hubBench.server = {
+ hitMe: function (start, clientCalls, connectionId) {
+ /// <summary>Calls the HitMe method on the server-side HubBench hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="start" type="Number">Server side type is System.Int64</param>
+ /// <param name="clientCalls" type="Number">Server side type is System.Int32</param>
+ /// <param name="connectionId" type="String">Server side type is System.String</param>
+ return signalR.hubBench.invoke.apply(signalR.hubBench, $.merge(["HitMe"], $.makeArray(arguments)));
+ },
+
+ hitUs: function (start, clientCalls) {
+ /// <summary>Calls the HitUs method on the server-side HubBench hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="start" type="Number">Server side type is System.Int64</param>
+ /// <param name="clientCalls" type="Number">Server side type is System.Int32</param>
+ return signalR.hubBench.invoke.apply(signalR.hubBench, $.merge(["HitUs"], $.makeArray(arguments)));
+ }
+ };
+
+ signalR.mouseTracking = signalR.hub.createProxy('mouseTracking');
+ signalR.mouseTracking.client = { };
+ signalR.mouseTracking.server = {
+ join: function () {
+ /// <summary>Calls the Join method on the server-side MouseTracking hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.mouseTracking.invoke.apply(signalR.mouseTracking, $.merge(["Join"], $.makeArray(arguments)));
+ },
+
+ move: function (x, y) {
+ /// <summary>Calls the Move method on the server-side MouseTracking hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="x" type="Number">Server side type is System.Int32</param>
+ /// <param name="y" type="Number">Server side type is System.Int32</param>
+ return signalR.mouseTracking.invoke.apply(signalR.mouseTracking, $.merge(["Move"], $.makeArray(arguments)));
+ }
+ };
+
+ signalR.shapeShare = signalR.hub.createProxy('shapeShare');
+ signalR.shapeShare.client = { };
+ signalR.shapeShare.server = {
+ getShapes: function () {
+ /// <summary>Calls the GetShapes method on the server-side ShapeShare hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.shapeShare.invoke.apply(signalR.shapeShare, $.merge(["GetShapes"], $.makeArray(arguments)));
+ },
+
+ join: function (userName) {
+ /// <summary>Calls the Join method on the server-side ShapeShare hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="userName" type="String">Server side type is System.String</param>
+ return signalR.shapeShare.invoke.apply(signalR.shapeShare, $.merge(["Join"], $.makeArray(arguments)));
+ },
+
+ changeUserName: function (currentUserName, newUserName) {
+ /// <summary>Calls the ChangeUserName method on the server-side ShapeShare hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="currentUserName" type="String">Server side type is System.String</param>
+ /// <param name="newUserName" type="String">Server side type is System.String</param>
+ return signalR.shapeShare.invoke.apply(signalR.shapeShare, $.merge(["ChangeUserName"], $.makeArray(arguments)));
+ },
+
+ createShape: function (type) {
+ /// <summary>Calls the CreateShape method on the server-side ShapeShare hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="type" type="String">Server side type is System.String</param>
+ return signalR.shapeShare.invoke.apply(signalR.shapeShare, $.merge(["CreateShape"], $.makeArray(arguments)));
+ },
+
+ changeShape: function (id, x, y, w, h) {
+ /// <summary>Calls the ChangeShape method on the server-side ShapeShare hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="id" type="String">Server side type is System.String</param>
+ /// <param name="x" type="Number">Server side type is System.Int32</param>
+ /// <param name="y" type="Number">Server side type is System.Int32</param>
+ /// <param name="w" type="Number">Server side type is System.Int32</param>
+ /// <param name="h" type="Number">Server side type is System.Int32</param>
+ return signalR.shapeShare.invoke.apply(signalR.shapeShare, $.merge(["ChangeShape"], $.makeArray(arguments)));
+ },
+
+ deleteShape: function (id) {
+ /// <summary>Calls the DeleteShape method on the server-side ShapeShare hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ /// <param name="id" type="String">Server side type is System.String</param>
+ return signalR.shapeShare.invoke.apply(signalR.shapeShare, $.merge(["DeleteShape"], $.makeArray(arguments)));
+ },
+
+ deleteAllShapes: function () {
+ /// <summary>Calls the DeleteAllShapes method on the server-side ShapeShare hub.&#10;Returns a jQuery.Deferred() promise.</summary>
+ return signalR.shapeShare.invoke.apply(signalR.shapeShare, $.merge(["DeleteAllShapes"], $.makeArray(arguments)));
+ }
+ };
+
+ signalR.StatusHub = signalR.hub.createProxy('StatusHub');
+ signalR.StatusHub.client = { };
+ signalR.StatusHub.server = {
+ };
+
+}(window.jQuery, window));
View
3 samples/SignalR.Hosting.AspNet45.Samples/Scripts/signalr.samples.js
@@ -9,4 +9,5 @@
}
}
-var activeTransport = getQueryVariable('transport') || 'auto';
+var activeTransport = getQueryVariable('transport') || 'auto';
+var isJsonp = getQueryVariable('jsonp') === 'true';
View
59 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Hosting.AspNet.Samples.csproj
@@ -11,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SignalR.Hosting.AspNet.Samples</RootNamespace>
<AssemblyName>SignalR.Hosting.AspNet.Samples</AssemblyName>
- <UseIISExpress>true</UseIISExpress>
+ <UseIISExpress>false</UseIISExpress>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<IISExpressSSLPort />
@@ -51,10 +51,24 @@
<Reference Include="HtmlSanitizationLibrary">
<HintPath>..\..\packages\AntiXSS.4.0.1\lib\net35\HtmlSanitizationLibrary.dll</HintPath>
</Reference>
+ <Reference Include="Microsoft.AspNet.Owin, Version=0.7.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\packages\Microsoft.AspNet.Owin.0.7\lib\Microsoft.AspNet.Owin.dll</HintPath>
+ </Reference>
<Reference Include="Microsoft.CSharp" />
+ <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="Microsoft.WebSockets.Owin, Version=0.7.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\packages\Microsoft.WebSockets.Owin.0.7\lib\Microsoft.WebSockets.Owin.dll</HintPath>
+ </Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.4.5.4\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
+ <Reference Include="Owin.Startup">
+ <HintPath>..\..\packages\Owin.Startup.0.4\lib\net40\Owin.Startup.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web" />
@@ -108,7 +122,6 @@
<Content Include="Content\themes\smoothness\images\ui-icons_888888_256x240.png" />
<Content Include="Content\themes\smoothness\images\ui-icons_cd0a0a_256x240.png" />
<Content Include="Content\themes\smoothness\jquery-ui-1.8.12.css" />
- <Content Include="Default.aspx" />
<Content Include="Global.asax" />
<Content Include="Hubs\Benchmark\crossdomain.htm" />
<Content Include="Hubs\Benchmark\Benchmark.js" />
@@ -131,6 +144,7 @@
<Content Include="Hubs\ShapeShare\ShapeShare.css" />
<Content Include="Hubs\ShapeShare\ShapeShare.js" />
<Content Include="Hubs\ShapeShare\index.htm" />
+ <Content Include="index.htm" />
<Content Include="Raw\crossdomain.htm" />
<Content Include="Raw\index.htm" />
<Content Include="Raw\test\basic.htm" />
@@ -197,13 +211,6 @@
<Compile Include="..\SignalR.Hosting.AspNet.Samples\Raw\TestConnection.cs">
<Link>Raw\TestConnection.cs</Link>
</Compile>
- <Compile Include="Default.aspx.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="Default.aspx.designer.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- </Compile>
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
@@ -213,20 +220,6 @@
<Compile Include="Hubs\Chat\ContentProviders\ImageContentProvider.cs" />
<Compile Include="Hubs\Chat\ContentProviders\YouTubeContentProvider.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="SignalR.Master.cs">
- <DependentUpon>SignalR.Master</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="SignalR.Master.designer.cs">
- <DependentUpon>SignalR.Master</DependentUpon>
- </Compile>
- <Compile Include="SignalR.Samples.master.cs">
- <DependentUpon>SignalR.Samples.master</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="SignalR.Samples.master.designer.cs">
- <DependentUpon>SignalR.Samples.master</DependentUpon>
- </Compile>
<Compile Include="Streaming\Streaming.cs" />
</ItemGroup>
<ItemGroup>
@@ -238,25 +231,19 @@
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\SignalR.Hosting.AspNet45\SignalR.Hosting.AspNet45.csproj">
- <Project>{6f53f576-0e35-4e89-8d4d-b6b40084a16c}</Project>
- <Name>SignalR.Hosting.AspNet45</Name>
+ <ProjectReference Include="..\..\SignalR.Server.Routing\SignalR.Server.Routing.csproj">
+ <Project>{37c04b69-0989-458a-b80c-a1ed574adbe4}</Project>
+ <Name>SignalR.Server.Routing</Name>
</ProjectReference>
- <ProjectReference Include="..\..\SignalR.Hosting.Common\SignalR.Hosting.Common.csproj">
- <Project>{3B71F0AE-D4B6-4F47-BF62-333D45615673}</Project>
- <Name>SignalR.Hosting.Common</Name>
+ <ProjectReference Include="..\..\SignalR.Server\SignalR.Server.csproj">
+ <Project>{2b8c6dad-4d85-41b1-83fd-248d9f347522}</Project>
+ <Name>SignalR.Server</Name>
</ProjectReference>
<ProjectReference Include="..\..\SignalR\SignalR.csproj">
<Project>{1B9A82C4-BCA1-4834-A33E-226F17BE070B}</Project>
<Name>SignalR</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <Content Include="SignalR.Samples.master" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="SignalR.Master" />
- </ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
@@ -274,7 +261,7 @@
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort>40477</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
- <IISUrl>http://localhost:40477/</IISUrl>
+ <IISUrl>http://localhost:40478</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
View
32 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Master
@@ -1,32 +0,0 @@
-<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SignalR.Master.cs" Inherits="SignalR.Samples.SignalRMaster" %>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" class="no-js">
-<head runat="server">
- <title>SignalR Samples</title>
- <link href="~/Content/site.css" rel="stylesheet" />
- <asp:ContentPlaceHolder ID="HeadContent" runat="server"></asp:ContentPlaceHolder>
- <script>document.getElementsByTagName("html")[0].className = "js";</script>
-</head>
-<body>
- <div id="page">
- <header class="header">
- <div class="title">
- <h1>SignalR</h1>
- </div>
- </header>
- <nav>
- <ul>
- <li><asp:HyperLink runat="server" NavigateUrl="~/">home</asp:HyperLink></li>
- <%--<li><asp:HyperLink runat="server" NavigateUrl="~/SignalRSamples">samples</asp:HyperLink></li>--%>
- </ul>
- </nav>
- <section class="main">
- <asp:ContentPlaceHolder ID="MainContent" runat="server" />
- </section>
- <div class="clear"></div>
- <footer>
- SignalR, Copyright © Damian Edwards, David Fowler
- </footer>
- </div>
-</body>
-</html>
View
12 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Master.cs
@@ -1,12 +0,0 @@
-using System;
-
-namespace SignalR.Samples
-{
- public partial class SignalRMaster : System.Web.UI.MasterPage
- {
- protected void Page_Load(object sender, EventArgs e)
- {
-
- }
- }
-}
View
35 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Master.designer.cs
@@ -1,35 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace SignalR.Samples
-{
-
-
- public partial class SignalRMaster
- {
-
- /// <summary>
- /// HeadContent control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
-
- /// <summary>
- /// MainContent control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
- }
-}
View
8 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Samples.master
@@ -1,8 +0,0 @@
-<%@ Master Language="C#" MasterPageFile="~/SignalR.Master" AutoEventWireup="true" CodeBehind="SignalR.Samples.master.cs"
- Inherits="SignalR.Samples.SignalRSamples.SignalRSamples" %>
-<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
- <asp:ContentPlaceHolder ID="HeadContent" runat="server"></asp:ContentPlaceHolder>
-</asp:Content>
-<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
- <asp:ContentPlaceHolder ID="MainContent" runat="server" />
-</asp:Content>
View
12 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Samples.master.cs
@@ -1,12 +0,0 @@
-using System;
-
-namespace SignalR.Samples.SignalRSamples
-{
- public partial class SignalRSamples : System.Web.UI.MasterPage
- {
- protected void Page_Load(object sender, EventArgs e)
- {
-
- }
- }
-}
View
35 samples/SignalR.Hosting.AspNet45.Samples/SignalR.Samples.master.designer.cs
@@ -1,35 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace SignalR.Samples.SignalRSamples
-{
-
-
- public partial class SignalRSamples
- {
-
- /// <summary>
- /// HeadContent control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
-
- /// <summary>
- /// MainContent control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
- }
-}
View
79 samples/SignalR.Hosting.AspNet45.Samples/index.htm
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" class="no-js">
+<head>
+ <title>SignalR Samples
+ </title>
+ <link href="Content/site.css" rel="stylesheet" />
+ <script>document.getElementsByTagName("html")[0].className = "js";</script>
+</head>
+<body>
+ <div id="page">
+ <header class="header">
+ <div class="title">
+ <h1>SignalR</h1>
+ </div>
+ </header>
+ <nav>
+ <ul>
+ <li><a href="./">home</a></li>
+ </ul>
+ </nav>
+ <section class="main">
+ <div id="home">
+ <ul>
+ <li class="raw"><a href="Raw/">
+ <p class="title">Raw Connection</p>
+ </a></li>
+ <li class="streaming"><a href="Streaming/">
+ <p class="title">Streaming</p>
+ </a></li>
+ <li class="demo-hub"><a href="Hubs/DemoHub/">
+ <p class="title">Demo Hub</p>
+ </a></li>
+ <li class="status"><a href="Hubs/ConnectDisconnect/">
+ <p class="title">Connection Status</p>
+ </a></li>
+ <li class="chat"><a href="Hubs/Chat/">
+ <p class="title">Chat</p>
+ </a></li>
+ <li class="mouse-tracking"><a href="Hubs/MouseTracking/">
+ <p class="title">Mouse Tracking</p>
+ </a></li>
+ <li class="drawing-pad"><a href="Hubs/DrawingPad">
+ <p class="title">Drawing pad</p>
+ </a></li>
+ <li class="shape-share"><a href="Hubs/ShapeShare/">
+ <p class="title">Shape Share</p>
+ </a></li>
+ <li class="hub-bench"><a href="Hubs/Benchmark/">
+ <p class="title">Hub Ping</p>
+ </a></li>
+ </ul>
+ </div>
+ <div class="clear"></div>
+ <script src="Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
+ <script src="Scripts/jquery.color.js" type="text/javascript"></script>
+ <script src="Scripts/jquery.transform.js" type="text/javascript"></script>
+ <script src="Scripts/jquery.easing.1.3.js" type="text/javascript"></script>
+ <script src="Scripts/jquery.hoverMorph.js" type="text/javascript"></script>
+ <script>
+ $(function () {
+ $("#home li").hoverMorph()
+ .click(function (e) {
+ if (e.target.tagName.toLowerCase() !== "a") {
+ document.location = $(this).find("a").attr("href");
+ }
+ })
+ .css({
+ cursor: "pointer"
+ });
+ });
+ </script>
+ </section>
+ <div class="clear"></div>
+ <footer>
+ SignalR, Copyright © Damian Edwards, David Fowler
+ </footer>
+ </div>
+</body>
+</html>
View
4 samples/SignalR.Hosting.AspNet45.Samples/packages.config
@@ -10,5 +10,9 @@
<package id="jQuery.Templates" version="0.1" />
<package id="jQuery.UI.Combined" version="1.8.13" />
<package id="json2" version="1.0" />
+ <package id="Microsoft.AspNet.Owin" version="0.7" targetFramework="net45" />
+ <package id="Microsoft.Web.Infrastructure"