Skip to content

Commit

Permalink
Add new SendAll/SendAllAsync/SendAllOneWay API's to IServiceClient in…
Browse files Browse the repository at this point in the history
…terfaces
  • Loading branch information
mythz committed Nov 14, 2014
1 parent 78d00a6 commit 3c3047a
Show file tree
Hide file tree
Showing 18 changed files with 92 additions and 3 deletions.
Binary file modified lib/ServiceStack.Client.dll
Binary file not shown.
Binary file modified lib/ServiceStack.Common.dll
Binary file not shown.
Binary file modified lib/ServiceStack.Interfaces.dll
Binary file not shown.
Binary file modified lib/ServiceStack.Razor.BuildTask.dll
Binary file not shown.
Binary file modified lib/ServiceStack.dll
Binary file not shown.
Binary file modified lib/ServiceStack.pdb
Binary file not shown.
Expand Up @@ -2,6 +2,7 @@
//License: https://raw.github.com/ServiceStack/ServiceStack/master/license.txt

using System;
using System.Collections.Generic;

namespace ServiceStack.Messaging
{
Expand Down Expand Up @@ -49,6 +50,11 @@ public void SendOneWay(string queueName, object requestDto)
Publish(queueName, MessageFactory.Create(requestDto));
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void Notify(string queueName, IMessage message)
{
var messageBytes = message.ToBytes();
Expand Down
8 changes: 7 additions & 1 deletion src/ServiceStack.Client/Messaging/RedisMessageProducer.cs
Expand Up @@ -2,6 +2,7 @@
//License: https://raw.github.com/ServiceStack/ServiceStack/master/license.txt

using System;
using System.Collections.Generic;
using ServiceStack.Redis;
using ServiceStack.Text;

Expand Down Expand Up @@ -63,7 +64,12 @@ public void SendOneWay(string queueName, object requestDto)
Publish(queueName, MessageFactory.Create(requestDto));
}

public void Publish(string queueName, IMessage message)
public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void Publish(string queueName, IMessage message)
{
using (__requestAccess())
{
Expand Down
6 changes: 6 additions & 0 deletions src/ServiceStack.Client/Messaging/RedisMessageQueueClient.cs
Expand Up @@ -2,6 +2,7 @@
//License: https://raw.github.com/ServiceStack/ServiceStack/master/license.txt

using System;
using System.Collections.Generic;
using ServiceStack.Redis;

namespace ServiceStack.Messaging
Expand Down Expand Up @@ -79,6 +80,11 @@ public void SendOneWay(string queueName, object requestDto)
Publish(queueName, MessageFactory.Create(requestDto));
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void Publish(string queueName, IMessage message)
{
using (__requestAccess())
Expand Down
15 changes: 15 additions & 0 deletions src/ServiceStack.Client/WcfServiceClient.cs
Expand Up @@ -338,6 +338,11 @@ public void Send(IReturnVoid request)
throw new NotImplementedException();
}

public List<TResponse> SendAll<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void Get(IReturnVoid request)
{
throw new NotImplementedException();
Expand Down Expand Up @@ -529,6 +534,11 @@ public void SendOneWay(string relativeOrAbsoluteUrl, object request)
SendOneWay(Message.CreateMessage(MessageVersion, relativeOrAbsoluteUrl, request));
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void SendOneWay(object requestDto, string action)
{
SendOneWay(Message.CreateMessage(MessageVersion, action, requestDto));
Expand Down Expand Up @@ -657,6 +667,11 @@ public Task<TResponse> SendAsync<TResponse>(object requestDto)
throw new NotImplementedException();
}

public Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void Dispose()
{
}
Expand Down
4 changes: 4 additions & 0 deletions src/ServiceStack.Interfaces/IOneWayClient.cs
@@ -1,9 +1,13 @@
using System.Collections.Generic;

namespace ServiceStack
{
public interface IOneWayClient
{
void SendOneWay(object requestDto);

void SendOneWay(string relativeOrAbsoluteUri, object requestDto);

void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests);
}
}
5 changes: 4 additions & 1 deletion src/ServiceStack.Interfaces/IReplyClient.cs
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.IO;

namespace ServiceStack
Expand All @@ -12,5 +13,7 @@ public interface IReplyClient
TResponse Send<TResponse>(object request);
TResponse Send<TResponse>(IReturn<TResponse> request);
void Send(IReturnVoid request);
}

List<TResponse> SendAll<TResponse>(IEnumerable<IReturn<TResponse>> requests);
}
}
4 changes: 3 additions & 1 deletion src/ServiceStack.Interfaces/IServiceClientAsync.cs
@@ -1,9 +1,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ServiceStack
{
public interface IServiceClientAsync : IRestClientAsync
{
Task<TResponse> SendAsync<TResponse>(object requestDto);
}
Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<IReturn<TResponse>> requests);
}
}
5 changes: 5 additions & 0 deletions src/ServiceStack.RabbitMq/RabbitMqProducer.cs
Expand Up @@ -83,6 +83,11 @@ public void SendOneWay(string queueName, object requestDto)
Publish(queueName, MessageFactory.Create(requestDto));
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void Publish(string queueName, IMessage message, string exchange)
{
using (__requestAccess())
Expand Down
@@ -1,5 +1,6 @@
#if !SL5
using System;
using System.Collections.Generic;
using System.Net.Sockets;

namespace ServiceStack.Messaging.Rcon
Expand Down Expand Up @@ -45,6 +46,11 @@ public void SendOneWay(string queueName, object requestDto)
Publish(queueName, MessageFactory.Create(requestDto));
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

/// <summary>
/// Publish the specified message into the durable queue @queueName
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions src/ServiceStack/Messaging/InMemoryTransientMessageFactory.cs
@@ -1,4 +1,5 @@
#if !SL5
using System.Collections.Generic;
using ServiceStack.Logging;

namespace ServiceStack.Messaging
Expand Down Expand Up @@ -84,6 +85,11 @@ public void SendOneWay(string queueName, object requestDto)
Publish(queueName, MessageFactory.Create(requestDto));
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new System.NotImplementedException();
}

public void Dispose()
{
}
Expand Down
15 changes: 15 additions & 0 deletions tests/ServiceStack.Common.Tests/TestBase.cs
Expand Up @@ -111,6 +111,11 @@ public void SendOneWay(string relativeOrAbsoluteUri, object requestDto)
ServiceManager.Execute(requestDto);
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public TResponse Send<TResponse>(object request)
{
var message = MessageFactory.Create(request);
Expand Down Expand Up @@ -156,6 +161,11 @@ public void Send(IReturnVoid request)
throw new NotImplementedException();
}

public List<TResponse> SendAll<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public HttpWebResponse Get(object request)
{
throw new NotImplementedException();
Expand Down Expand Up @@ -367,6 +377,11 @@ public Task<TResponse> SendAsync<TResponse>(object requestDto)
return tcs.Task;
}

public Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

private static void HandleException<TResponse>(Exception exception, Action<TResponse, Exception> onError)
{
var response = (TResponse)typeof(TResponse).CreateInstance();
Expand Down
Expand Up @@ -32,6 +32,11 @@ public void SendOneWay(string relativeOrAbsoluteUri, object requestDto)
ServiceController.Execute(requestDto);
}

public void SendAllOneWay<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

private bool ApplyRequestFilters<TResponse>(object request)
{
if (HostContext.ApplyRequestFilters(httpReq, httpRes, request))
Expand Down Expand Up @@ -101,6 +106,11 @@ public void Send(IReturnVoid request)
throw new NotImplementedException();
}

public List<TResponse> SendAll<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public TResponse Patch<TResponse>(string relativeOrAbsoluteUrl, object requestDto)
{
throw new NotImplementedException();
Expand Down Expand Up @@ -346,6 +356,11 @@ public Task<TResponse> SendAsync<TResponse>(object requestDto)
}
}

public Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<IReturn<TResponse>> requests)
{
throw new NotImplementedException();
}

public void SetCredentials(string userName, string password)
{
throw new NotImplementedException();
Expand Down

0 comments on commit 3c3047a

Please sign in to comment.