Skip to content

Commit

Permalink
Made changes as per code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
abnanda1 committed Nov 18, 2013
1 parent eac42d7 commit 6892edb
Show file tree
Hide file tree
Showing 23 changed files with 134 additions and 45 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ PublishProfiles/
/samples/Microsoft.AspNet.SignalR.Client.WindowsStoreJavaScript.Samples/bld/
jquery.signalR.js
jquery.signalR.min.js
xamarin/SignalRPackage/component/lib/mobile/Microsoft.AspNet.SignalR.Client.dll
xamarin/SignalRPackage/component/lib/mobile/Newtonsoft.Json.dll
xamarin/SignalRPackage/component/lib/mobile/System.Net.Http.Extensions.dll
xamarin/SignalRPackage/component/lib/mobile/
29 changes: 20 additions & 9 deletions Microsoft.AspNet.SignalR.Mono.Mobile.sln
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.SignalR.Client.Android.Samples", "samples\Microsoft.AspNet.SignalR.Client.Android.Samples\Microsoft.AspNet.SignalR.Client.Android.Samples.csproj", "{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.SignalR.Client.iOS.Samples", "samples\Microsoft.AspNet.SignalR.Client.iOS.Samples\Microsoft.AspNet.SignalR.Client.iOS.Samples.csproj", "{DBFB861C-DF65-4784-B2B7-85DBFF01E787}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
Release|iPhone = Release|iPhone
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Ad-Hoc|iPhone = Ad-Hoc|iPhone
AppStore|iPhone = AppStore|iPhone
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
AppStore|Any CPU = AppStore|Any CPU
AppStore|iPhone = AppStore|iPhone
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
Debug|Any CPU = Debug|Any CPU
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|Any CPU = Release|Any CPU
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.AppStore|iPhone.Build.0 = Release|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
Expand All @@ -39,10 +45,12 @@ Global
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Release|iPhone.Build.0 = Release|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{AA8BF4BF-7805-40C0-977F-0D5D7AA4D948}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.AppStore|iPhone.Build.0 = AppStore|iPhone
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.AppStore|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
Expand All @@ -60,6 +68,9 @@ Global
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{DBFB861C-DF65-4784-B2B7-85DBFF01E787}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = samples\Microsoft.AspNet.SignalR.Client.Android.Samples\Microsoft.AspNet.SignalR.Client.Android.Samples.csproj
EndGlobalSection
Expand Down
8 changes: 6 additions & 2 deletions build/Build.proj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildProjectDirectory)\Build.tasks" />
<Import Project="Build-ItemDefinitionGroup.proj"
<Import Project="Microsoft.AspNet.SignalR.Projects.Properties.proj"
Condition=" '$(OS)' == 'Windows_NT' " />

<PropertyGroup>
Expand Down Expand Up @@ -174,6 +174,10 @@
<Find>AssemblyVersion\("\d+\.\d+\.\d+"\)</Find>
<ReplaceWith>AssemblyVersion("$(AssemblyVersion)")</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(XamarinDir)\SignalRPackage\component\component.yaml">
<Find>version: \d+\.\d+\.\d+(-\w+\d*(-\d+)?)?</Find>
<ReplaceWith>version: $(PackageVersion)</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(ProjectRoot)\src\Common\CommonVersionInfo.cs">
<Find>AssemblyInformationalVersion\("\d+\.\d+\.\d+(-\w+\d*(-\d+)?)?"\)</Find>
<ReplaceWith>AssemblyInformationalVersion("$(PackageVersion)")</ReplaceWith>
Expand Down Expand Up @@ -454,7 +458,7 @@
$(ProjectRoot)\packages\Microsoft.Net.Http.2.1.10\lib\portable-net40+sl4+win8+wp71\System.Net.Http.Extensions.dll">
</XamarinArtifacts>
</ItemGroup>

<Copy SourceFiles="@(XamarinArtifacts)" DestinationFolder="$(XamarinDir)\SignalRPackage\component\lib\mobile"/>

<Exec Command='mono $(XamarinDir)\xamarin-component\xamarin-component.exe package "$(XamarinDir)\SignalRPackage\component"' ContinueOnError="true" />
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions samples/Common/CommonClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ private async Task RunHubConnectionAPI(string url)

var hubProxy = hubConnection.CreateHubProxy("HubConnectionAPI");
hubProxy.On<string>("displayMessage", (data) => hubConnection.TraceWriter.WriteLine(data));

await hubConnection.Start();
hubConnection.TraceWriter.WriteLine("transport.Name={0}", hubConnection.Transport.Name);

await hubProxy.Invoke("DisplayMessageCaller", "Hello Caller!");

string joinGroupResponse = await hubProxy.Invoke<string>("JoinGroup", hubConnection.ConnectionId, "CommonClientGroup");
hubConnection.TraceWriter.WriteLine("joinGroupResponse={0}", joinGroupResponse);

await hubProxy.Invoke("DisplayMessageGroup", "CommonClientGroup", "Hello Group Members!");

string leaveGroupResponse = await hubProxy.Invoke<string>("LeaveGroup", hubConnection.ConnectionId, "CommonClientGroup");
Expand All @@ -68,7 +68,7 @@ private async Task RunDemo(string url)
hubConnection.TraceWriter = _traceWriter;

var hubProxy = hubConnection.CreateHubProxy("demo");
hubProxy.On<int>("invoke", (i) =>
hubProxy.On<int>("invoke", (i) =>
{
int n = hubProxy.GetValue<int>("index");
hubConnection.TraceWriter.WriteLine("{0} client state index -> {1}", i, n);
Expand Down Expand Up @@ -124,7 +124,7 @@ private async Task RunAuth(string serverUrl)
#if !ANDROID && !iOS
connection.CookieContainer = handler.CookieContainer;
#endif
await connection.Start();
await connection.Start();
await connection.Send("sending to AuthenticatedEchoConnection");

var hubConnection = new HubConnection(url);
Expand All @@ -135,10 +135,10 @@ private async Task RunAuth(string serverUrl)
var hubProxy = hubConnection.CreateHubProxy("AuthHub");
hubProxy.On<string, string>("invoked", (connectionId, date) => hubConnection.TraceWriter.WriteLine("connectionId={0}, date={1}", connectionId, date));

await hubConnection.Start();
await hubConnection.Start();
hubConnection.TraceWriter.WriteLine("transport.Name={0}", hubConnection.Transport.Name);

await hubProxy.Invoke("InvokedFromClient");
await hubProxy.Invoke("InvokedFromClient");
}

private async Task RunWindowsAuth(string url)
Expand Down Expand Up @@ -225,6 +225,6 @@ private async Task RunPendingCallbacks(string url)
await Task.Factory.StartNew(() => event2.WaitOne());
hubConnection.TraceWriter.WriteLine("check memory size after all callbacks completed");
}
}
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -22,7 +22,7 @@
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<DefineConstants>DEBUG;ANDROID</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="Microsoft.AspNet.SignalR.Client.Android.Samples">
<uses-sdk />
<application android:label="Microsoft.AspNet.SignalR.Client.Android.Samples">
</application>
<application android:label="Microsoft.AspNet.SignalR.Client.Android.Samples"></application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

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

9 changes: 9 additions & 0 deletions xamarin/SignalRPackage/component/Details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ASP.NET SignalR
Async signaling library for .NET to help build real-time, multi-user interactive web applications

## What can it be used for?
Pushing data from the server to the client (not just browser clients) has always been a tough problem. SignalR makes
it dead easy and handles all the heavy lifting for you.

## Documentation
See the [documentation](https://github.com/SignalR/SignalR/wiki)
50 changes: 50 additions & 0 deletions xamarin/SignalRPackage/component/GettingStarted.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# ASP.NET SignalR
Async signaling library for .NET to help build real-time, multi-user interactive web applications

## What can it be used for?
Pushing data from the server to the client (not just browser clients) has always been a tough problem. SignalR makes
it dead easy and handles all the heavy lifting for you.

## Documentation
See the [documentation](https://github.com/SignalR/SignalR/wiki)

## How to install and use the SignalR Xamarin component?

Right click on the Components folder in your project and click on Edit Components. Search for the SignalR component and install it.

## Get a sample on NuGet, straight into your app!

Install-Package Microsoft.AspNet.SignalR.Sample

## LICENSE
[Apache 2.0 License](https://github.com/SignalR/SignalR/blob/master/LICENSE.md)

## Building the source

```
git clone [email protected]:SignalR/SignalR.git (or https if you use https)
```

### Windows
After cloning the repository, run `build.cmd`.

If the ASP.NET samples csproj won't load when opening the solution in Visual Studio then
download [Web Platform Installer](http://www.microsoft.com/web/downloads/platform.aspx) and install IIS Express.

### Mono
After cloning the repository, run `make`.

**NOTE:** Run `make tests` to run the unit tests. After running them it'll probably hang. If it does hang
use `Ctrl+C` to break out (We're still working on this).

Open Microsoft.AspNet.SignalR.Mono.sln to do development.

## Continuous Integration

We have a CI Server (http://ci.signalr.net/)

We generate packages from our ci builds to this feed http://www.myget.org/F/signalr/. If you want to live on the bleeding
edge and don't want to clone the source. You can try things out this way.

## Questions?
The SignalR team hangs out in the [signalr](http://jabbr.net/#/rooms/signalr) room at on [JabbR](http://jabbr.net/).
13 changes: 13 additions & 0 deletions xamarin/SignalRPackage/component/License.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions
and limitations under the License.
4 changes: 2 additions & 2 deletions xamarin/SignalRPackage/component/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ libraries:
summary: Incredibly simple real-time web for .NET.
details: Details.md
getting-started: GettingStarted.md
version: 2.0.0
version: 2.0.1-pre
samples:
iOS and Android Samples: samples/SignalRSample.sln
iOS and Android Samples: samples/Microsoft Visual Studio Solution.sln
no_build: true
skip_docs: true
...
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalRSample", "SignalRSample\SignalRSample.csproj", "{5501C06F-03B8-4B78-998A-75E843178473}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.SignalR.Xamarin.Sample", "Microsoft.AspNet.SignalR.Xamarin.Sample\Microsoft.AspNet.SignalR.Xamarin.Sample.csproj", "{5501C06F-03B8-4B78-998A-75E843178473}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -14,6 +16,9 @@ Global
{5501C06F-03B8-4B78-998A-75E843178473}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5501C06F-03B8-4B78-998A-75E843178473}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = SignalRSample\SignalRSample.csproj
EndGlobalSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
using Android.Widget;
using Android.OS;

namespace SignalRSample
namespace Microsoft.AspNet.SignalR.Xamarin.Sample
{
// Please refer to github.com/signalr/signalr for iOS and Android samples
// Please refer to http://github.com/signalr/signalr for iOS and Android samples
}


Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("SignalRSample")]
[assembly: AssemblyTitle ("Microsoft.AspNet.SignalR.Xamarin.Sample")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("abhisheknanda")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
Expand Down

0 comments on commit 6892edb

Please sign in to comment.