Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
src changes to compile in mono
  • Loading branch information
mythz committed Apr 17, 2011
1 parent e0f71ac commit 34c3db2
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 66 deletions.
Binary file modified lib/ServiceStack.ServiceInterface.dll 100644 → 100755
Binary file not shown.
2 changes: 0 additions & 2 deletions src/ServiceStack.Common/IPAddressExtensions.cs
Expand Up @@ -14,8 +14,6 @@ namespace ServiceStack.Common.Extensions
/// </summary> /// </summary>
public static class IPAddressExtensions public static class IPAddressExtensions
{ {
private static ILog log = LogManager.GetLogger(typeof (IPAddressExtensions));

public static IPAddress GetBroadcastAddress(this IPAddress address, IPAddress subnetMask) public static IPAddress GetBroadcastAddress(this IPAddress address, IPAddress subnetMask)
{ {
var ipAdressBytes = address.GetAddressBytes(); var ipAdressBytes = address.GetAddressBytes();
Expand Down
10 changes: 5 additions & 5 deletions src/ServiceStack.Common/ServiceClient.Web/AsyncServiceClient.cs
Expand Up @@ -125,7 +125,7 @@ public void SetCredentials(string userName, string password)
public void SendAsync<TResponse>(string httpMethod, string absoluteUrl, object request, public void SendAsync<TResponse>(string httpMethod, string absoluteUrl, object request,
Action<TResponse> onSuccess, Action<TResponse, Exception> onError) 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, private RequestState<TResponse> SendWebRequest<TResponse>(string httpMethod, string absoluteUrl, object request,
Expand Down Expand Up @@ -188,7 +188,7 @@ public void SetCredentials(string userName, string password)
} }
else else
{ {
var result = requestState.WebRequest.BeginGetResponse(ResponseCallback<TResponse>, requestState); requestState.WebRequest.BeginGetResponse(ResponseCallback<TResponse>, requestState);
} }
} }


Expand All @@ -202,7 +202,7 @@ private void RequestCallback<T>(IAsyncResult asyncResult)
var postStream = req.EndGetRequestStream(asyncResult); var postStream = req.EndGetRequestStream(asyncResult);
StreamSerializer(null, requestState.Request, postStream); StreamSerializer(null, requestState.Request, postStream);
postStream.Close(); postStream.Close();
var result = requestState.WebRequest.BeginGetResponse(ResponseCallback<T>, requestState); requestState.WebRequest.BeginGetResponse(ResponseCallback<T>, requestState);
} }
catch (Exception ex) catch (Exception ex)
{ {
Expand All @@ -222,7 +222,7 @@ private void ResponseCallback<T>(IAsyncResult asyncResult)
var responseStream = requestState.WebResponse.GetResponseStream(); var responseStream = requestState.WebResponse.GetResponseStream();
requestState.ResponseStream = responseStream; requestState.ResponseStream = responseStream;


var asyncRead = responseStream.BeginRead(requestState.BufferRead, 0, BufferSize, ReadCallBack<T>, requestState); responseStream.BeginRead(requestState.BufferRead, 0, BufferSize, ReadCallBack<T>, requestState);
return; return;
} }
catch (Exception ex) catch (Exception ex)
Expand Down Expand Up @@ -264,7 +264,7 @@ private void ReadCallBack<T>(IAsyncResult asyncResult)
{ {


requestState.BytesData.Write(requestState.BufferRead, 0, read); requestState.BytesData.Write(requestState.BufferRead, 0, read);
var nextAsyncResult = responseStream.BeginRead( responseStream.BeginRead(
requestState.BufferRead, 0, BufferSize, ReadCallBack<T>, requestState); requestState.BufferRead, 0, BufferSize, ReadCallBack<T>, requestState);


return; return;
Expand Down
Expand Up @@ -243,7 +243,7 @@ private string GetUrl(string relativeOrAbsoluteUrl)
public void SendOneWay(object request) public void SendOneWay(object request)
{ {
var requestUri = this.AsyncOneWayBaseUri.WithTrailingSlash() + request.GetType().Name; 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) public void SendAsync<TResponse>(object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceStack/ServiceHost/ServiceManager.cs
Expand Up @@ -9,7 +9,7 @@ namespace ServiceStack.ServiceHost
public class ServiceManager public class ServiceManager
: IDisposable : 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 Container Container { get; private set; }
public ServiceController ServiceController { get; private set; } public ServiceController ServiceController { get; private set; }
Expand Down
Expand Up @@ -10,7 +10,7 @@ namespace ServiceStack.WebHost.Endpoints.Extensions
internal class HttpResponseWrapper internal class HttpResponseWrapper
: IHttpResponse : IHttpResponse
{ {
private static readonly ILog Log = LogManager.GetLogger(typeof(HttpResponseWrapper)); //private static readonly ILog Log = LogManager.GetLogger(typeof(HttpResponseWrapper));


private readonly HttpResponse response; private readonly HttpResponse response;


Expand Down
Expand Up @@ -175,7 +175,7 @@ private void ListenerCallback(IAsyncResult asyncResult)
if (context == null) return; if (context == null) return;


//System.Diagnostics.Debug.WriteLine("Start: " + requestNumber + " at " + DateTime.Now); //System.Diagnostics.Debug.WriteLine("Start: " + requestNumber + " at " + DateTime.Now);
var request = context.Request; //var request = context.Request;


//if (request.HasEntityBody) //if (request.HasEntityBody)


Expand Down
Expand Up @@ -21,7 +21,7 @@ public void String_test_with_func_call()


for (var i=0; i < Times; i++) for (var i=0; i < Times; i++)
{ {
var result = action(); action();
} }


stopWatch.Stop(); stopWatch.Stop();
Expand All @@ -36,7 +36,7 @@ public void String_test_with_direct_call()


for (var i=0; i < Times; i++) for (var i=0; i < Times; i++)
{ {
var result = TextValue.ToUpper(); TextValue.ToUpper();
} }


stopWatch.Stop(); stopWatch.Stop();
Expand All @@ -53,7 +53,7 @@ public void String_test_with_reflection()


for (var i=0; i < Times; i++) for (var i=0; i < Times; i++)
{ {
var result = methodInfo.Invoke(TextValue, new object[] { }); methodInfo.Invoke(TextValue, new object[] { });
} }


stopWatch.Stop(); stopWatch.Stop();
Expand All @@ -71,7 +71,7 @@ public void String_test_with_delegate()


for (var i=0; i < Times; i++) for (var i=0; i < Times; i++)
{ {
var result = delMethod(TextValue, new object[] { }); delMethod(TextValue, new object[] { });
} }


stopWatch.Stop(); stopWatch.Stop();
Expand Down
Expand Up @@ -36,7 +36,7 @@ private void CompareSerializers<T>(T dto)
var seraializedStringDto = TypeSerializer.DeserializeFromString<T>(stringStr); var seraializedStringDto = TypeSerializer.DeserializeFromString<T>(stringStr);
Assert.That(seraializedStringDto.Equals(dto), Is.True); Assert.That(seraializedStringDto.Equals(dto), Is.True);


var seraializedTextDto = TextSerializer.DeserializeFromString<T>(textStr); TextSerializer.DeserializeFromString<T>(textStr);
//Assert.That(seraializedTextDto.Equals(dto), Is.True); //Assert.That(seraializedTextDto.Equals(dto), Is.True);
} }


Expand Down
@@ -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"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -77,33 +77,10 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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"> <Reference Include="Moq, Version=2.6.1014.1, Culture=neutral, PublicKeyToken=69f491c39445e920">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\tests\Moq.dll</HintPath> <HintPath>..\..\lib\tests\Moq.dll</HintPath>
</Reference> </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" />
<Reference Include="System.Core"> <Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework> <RequiredTargetFramework>3.5</RequiredTargetFramework>
Expand All @@ -125,6 +102,30 @@
</Reference> </Reference>
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <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>
<ItemGroup> <ItemGroup>
<Compile Include="AppHostListenerBaseTests.cs" /> <Compile Include="AppHostListenerBaseTests.cs" />
Expand Down

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

0 comments on commit 34c3db2

Please sign in to comment.