Permalink
Browse files

src changes to compile in mono

  • Loading branch information...
1 parent e0f71ac commit 34c3db27eba5de749839dddc102fc4e6b4031602 @mythz mythz committed Apr 17, 2011
View
Binary file not shown.
@@ -14,8 +14,6 @@ namespace ServiceStack.Common.Extensions
/// </summary>
public static class IPAddressExtensions
{
- private static ILog log = LogManager.GetLogger(typeof (IPAddressExtensions));
-
public static IPAddress GetBroadcastAddress(this IPAddress address, IPAddress subnetMask)
{
var ipAdressBytes = address.GetAddressBytes();
@@ -125,7 +125,7 @@ public void SetCredentials(string userName, string password)
public void SendAsync<TResponse>(string httpMethod, string absoluteUrl, object request,
Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
{
- var requestState = SendWebRequest(httpMethod, absoluteUrl, request, onSuccess, onError);
+ SendWebRequest(httpMethod, absoluteUrl, request, onSuccess, onError);
}
private RequestState<TResponse> SendWebRequest<TResponse>(string httpMethod, string absoluteUrl, object request,
@@ -188,7 +188,7 @@ public void SetCredentials(string userName, string password)
}
else
{
- var result = requestState.WebRequest.BeginGetResponse(ResponseCallback<TResponse>, requestState);
+ requestState.WebRequest.BeginGetResponse(ResponseCallback<TResponse>, requestState);
}
}
@@ -202,7 +202,7 @@ private void RequestCallback<T>(IAsyncResult asyncResult)
var postStream = req.EndGetRequestStream(asyncResult);
StreamSerializer(null, requestState.Request, postStream);
postStream.Close();
- var result = requestState.WebRequest.BeginGetResponse(ResponseCallback<T>, requestState);
+ requestState.WebRequest.BeginGetResponse(ResponseCallback<T>, requestState);
}
catch (Exception ex)
{
@@ -222,7 +222,7 @@ private void ResponseCallback<T>(IAsyncResult asyncResult)
var responseStream = requestState.WebResponse.GetResponseStream();
requestState.ResponseStream = responseStream;
- var asyncRead = responseStream.BeginRead(requestState.BufferRead, 0, BufferSize, ReadCallBack<T>, requestState);
+ responseStream.BeginRead(requestState.BufferRead, 0, BufferSize, ReadCallBack<T>, requestState);
return;
}
catch (Exception ex)
@@ -264,7 +264,7 @@ private void ReadCallBack<T>(IAsyncResult asyncResult)
{
requestState.BytesData.Write(requestState.BufferRead, 0, read);
- var nextAsyncResult = responseStream.BeginRead(
+ responseStream.BeginRead(
requestState.BufferRead, 0, BufferSize, ReadCallBack<T>, requestState);
return;
@@ -243,7 +243,7 @@ private string GetUrl(string relativeOrAbsoluteUrl)
public void SendOneWay(object request)
{
var requestUri = this.AsyncOneWayBaseUri.WithTrailingSlash() + request.GetType().Name;
- var client = SendRequest(requestUri, request);
+ SendRequest(requestUri, request);
}
public void SendAsync<TResponse>(object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
@@ -9,7 +9,7 @@ namespace ServiceStack.ServiceHost
public class ServiceManager
: IDisposable
{
- private static readonly ILog Log = LogManager.GetLogger(typeof (ServiceManager));
+ //private static readonly ILog Log = LogManager.GetLogger(typeof (ServiceManager));
public Container Container { get; private set; }
public ServiceController ServiceController { get; private set; }
@@ -10,7 +10,7 @@ namespace ServiceStack.WebHost.Endpoints.Extensions
internal class HttpResponseWrapper
: IHttpResponse
{
- private static readonly ILog Log = LogManager.GetLogger(typeof(HttpResponseWrapper));
+ //private static readonly ILog Log = LogManager.GetLogger(typeof(HttpResponseWrapper));
private readonly HttpResponse response;
@@ -175,7 +175,7 @@ private void ListenerCallback(IAsyncResult asyncResult)
if (context == null) return;
//System.Diagnostics.Debug.WriteLine("Start: " + requestNumber + " at " + DateTime.Now);
- var request = context.Request;
+ //var request = context.Request;
//if (request.HasEntityBody)
@@ -21,7 +21,7 @@ public void String_test_with_func_call()
for (var i=0; i < Times; i++)
{
- var result = action();
+ action();
}
stopWatch.Stop();
@@ -36,7 +36,7 @@ public void String_test_with_direct_call()
for (var i=0; i < Times; i++)
{
- var result = TextValue.ToUpper();
+ TextValue.ToUpper();
}
stopWatch.Stop();
@@ -53,7 +53,7 @@ public void String_test_with_reflection()
for (var i=0; i < Times; i++)
{
- var result = methodInfo.Invoke(TextValue, new object[] { });
+ methodInfo.Invoke(TextValue, new object[] { });
}
stopWatch.Stop();
@@ -71,7 +71,7 @@ public void String_test_with_delegate()
for (var i=0; i < Times; i++)
{
- var result = delMethod(TextValue, new object[] { });
+ delMethod(TextValue, new object[] { });
}
stopWatch.Stop();
@@ -36,7 +36,7 @@ private void CompareSerializers<T>(T dto)
var seraializedStringDto = TypeSerializer.DeserializeFromString<T>(stringStr);
Assert.That(seraializedStringDto.Equals(dto), Is.True);
- var seraializedTextDto = TextSerializer.DeserializeFromString<T>(textStr);
+ TextSerializer.DeserializeFromString<T>(textStr);
//Assert.That(seraializedTextDto.Equals(dto), Is.True);
}
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -77,33 +77,10 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\tests\Mono.Data.Sqlite.dll</HintPath>
- </Reference>
<Reference Include="Moq, Version=2.6.1014.1, Culture=neutral, PublicKeyToken=69f491c39445e920">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\tests\Moq.dll</HintPath>
</Reference>
- <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\tests\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.OrmLite, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\tests\ServiceStack.OrmLite.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.OrmLite.Sqlite, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\tests\ServiceStack.OrmLite.Sqlite.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.ServiceInterface">
- <HintPath>..\..\lib\ServiceStack.ServiceInterface.dll</HintPath>
- </Reference>
- <Reference Include="ServiceStack.Text, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\ServiceStack.Text.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -125,6 +102,30 @@
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
+ <Reference Include="Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\tests\Mono.Data.Sqlite.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.5.2.9222, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\tests\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.OrmLite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\tests\ServiceStack.OrmLite.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.OrmLite.Sqlite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\tests\ServiceStack.OrmLite.Sqlite.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Text, Version=2.0.9.28376, Culture=neutral, PublicKeyToken=null">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\ServiceStack.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.ServiceInterface, Version=1.0.4124.855, Culture=neutral, PublicKeyToken=null">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\ServiceStack.ServiceInterface.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AppHostListenerBaseTests.cs" />

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 34c3db2

Please sign in to comment.