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 May 31, 2013
1 parent 01e1334 commit 191d9e3
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 44 deletions.
8 changes: 7 additions & 1 deletion build/Build.proj
Expand Up @@ -84,12 +84,18 @@
<Projects Include="$(ProjectRoot)\src\Microsoft.AspNet.SignalR.Client.JS\Microsoft.AspNet.SignalR.Client.JS.csproj">
<CopyArtifacts>false</CopyArtifacts>
</Projects>
<!-- Don't copy dll's from WinRT project -->
<Projects Include="$(ProjectRoot)\src\Microsoft.AspNet.SignalR.Client.WinRT\Microsoft.AspNet.SignalR.Client.WinRT.csproj">
<Build Condition="!$(WinRTSDKInstalled)">false</Build>
<Platform>WinRT</Platform>
<CopyArtifacts>false</CopyArtifacts>
</Projects>
<!-- Only build the following clients if the SDK is installed -->
<Projects Include="$(ProjectRoot)\src\Microsoft.AspNet.SignalR.Client.Portable\Microsoft.AspNet.SignalR.Client.Portable.csproj">
<Build Condition="!$(Silverlight5SDKInstalled)">false</Build>
<Build Condition="!$(WP8SDKInstalled)">false</Build>
<Build Condition="!$(WinRTSDKInstalled)">false</Build>
<Platform>WinRT, SL5, WP8</Platform>
<Platform>portable-net40+sl4+win8+wp71</Platform>
<!-- HttpClient causes issues with running FxCop on the SL5 and WP8 clients -->
<RunFxCop>false</RunFxCop>
</Projects>
Expand Down
Expand Up @@ -242,7 +242,7 @@
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="..\..\build\Microsoft.Bcl.Build.targets" />
<Import Project="$(SolutionDir)\build\Microsoft.Bcl.Build.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
@@ -1,30 +1,7 @@
using System.Resources;
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.AspNet.SignalR.Client.Portable")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Microsoft.AspNet.SignalR.Client.Portable")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: AssemblyDescription("Portable client for SignalR targeting WinRT, SL and WP")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.SignalR.Client/Connection.cs
Expand Up @@ -764,7 +764,7 @@ private static string CreateUserAgentString(string client)
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The Version constructor can throw exceptions of many different types. Failure is indicated by returning false.")]
private static bool TryParseVersion(string versionString, out Version version)
{
#if PORTABLE || NET35
#if PORTABLE
try
{
version = new Version(versionString);
Expand Down
Expand Up @@ -88,7 +88,7 @@ public static bool EnsureReconnecting(this IConnection connection)
return connection.State == ConnectionState.Reconnecting;
}

#if !PORTABLE && !NET35 && !__ANDROID__ && !IOS
#if !PORTABLE && !__ANDROID__ && !IOS
public static IObservable<string> AsObservable(this Connection connection)
{
return connection.AsObservable(value => value);
Expand Down
Expand Up @@ -222,7 +222,7 @@ public static IDisposable On<T>(this IHubProxy proxy, string eventName, Action<T
return new DisposableAction(() => subscription.Received -= handler);
}

#if !PORTABLE && !NET35 && !__ANDROID__ && !IOS
#if !PORTABLE && !__ANDROID__ && !IOS
/// <summary>
/// Registers for an event with the specified name and callback
/// </summary>
Expand Down
Expand Up @@ -45,11 +45,7 @@ public void Abort(CancellationToken disconnectToken)
_callbackInvoker.Invoke((cb, token) =>
{
Initialized();
#if NET35
cb(new OperationCanceledException(Resources.Error_ConnectionCancelled));
#else
cb(new OperationCanceledException(Resources.Error_ConnectionCancelled, token));
#endif
}, _errorCallback, disconnectToken);
}
}
Expand Down
Expand Up @@ -45,11 +45,8 @@ public string ReadLine()
_buffer.Remove(0, _offset + 1);

string line = _lineBuilder.ToString().Trim();
#if NET35
_lineBuilder.Length = 0;
#else
_lineBuilder.Clear();
#endif

_offset = 0;
return line;
}
Expand Down
Expand Up @@ -215,11 +215,7 @@ private void Reconnect(IConnection connection, string data, CancellationToken di
{
callbackInvoker.Invoke((cb, token) =>
{
#if NET35
cb(new OperationCanceledException(Resources.Error_ConnectionCancelled));
#else
cb(new OperationCanceledException(Resources.Error_ConnectionCancelled, token));
#endif
}, errorCallback, disconnectToken);
}
}, _request);
Expand Down
Expand Up @@ -35,7 +35,7 @@ public void Set(IDisposable disposable)
}
else
{
#if !NET35 && !PORTABLE && !NETFX_CORE
#if !PORTABLE && !NETFX_CORE
// Set has been called multiple times, fail
Debug.Fail("Multiple calls to Disposer.Set(IDisposable) without calling Disposer.Dispose()");
#endif
Expand Down

0 comments on commit 191d9e3

Please sign in to comment.