- Proxy_Foo becomes FooProxy
- FooService becomes FooServiceBase
This commit is contained in:
Eduardo Salinas 2016-04-13 13:45:08 -07:00 коммит произвёл Christopher Warrington
Родитель 6f0d74624a
Коммит 13f72234ec
11 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -68,11 +68,11 @@ namespace #{csNamespace}
csNamespace = sepBy "." toText $ getNamespace cs
idl = MappingContext idlTypeMapping [] [] []
comm s@Service{..} = [lt|#{CS.typeAttributes cs s}public class Proxy_#{declName}<#{proxyGenerics}TConnection> : I#{declName}#{interfaceGenerics}#{connConstraint}
comm s@Service{..} = [lt|#{CS.typeAttributes cs s}public class #{declName}Proxy<#{proxyGenerics}TConnection> : I#{declName}#{interfaceGenerics}#{connConstraint}
{
private readonly TConnection m_connection;
public Proxy_#{declName}(TConnection connection)
public #{declName}Proxy(TConnection connection)
{
m_connection = connection;
}
@ -123,7 +123,7 @@ namespace #{csNamespace}
csNamespace = sepBy "." toText $ getNamespace cs
idl = MappingContext idlTypeMapping [] [] []
comm s@Service{..} = [lt|#{CS.typeAttributes cs s}public abstract class #{declName}Service#{generics} : I#{declName}#{generics}, global::Bond.Comm.IService
comm s@Service{..} = [lt|#{CS.typeAttributes cs s}public abstract class #{declName}ServiceBase#{generics} : I#{declName}#{generics}, global::Bond.Comm.IService
{
public global::System.Collections.Generic.IEnumerable<global::Bond.Comm.ServiceMethodInfo> Methods
{

Просмотреть файл

@ -16,11 +16,11 @@
namespace tests
{
[System.CodeDom.Compiler.GeneratedCode("gbc", "0.4.0.2")]
public class Proxy_Foo<Payload, TConnection> : IFoo<Payload> where TConnection : global::Bond.Comm.IRequestResponseConnection
public class FooProxy<Payload, TConnection> : IFoo<Payload> where TConnection : global::Bond.Comm.IRequestResponseConnection
{
private readonly TConnection m_connection;
public Proxy_Foo(TConnection connection)
public FooProxy(TConnection connection)
{
m_connection = connection;
}

Просмотреть файл

@ -16,7 +16,7 @@
namespace tests
{
[System.CodeDom.Compiler.GeneratedCode("gbc", "0.4.0.2")]
public abstract class FooService<Payload> : IFoo<Payload>, global::Bond.Comm.IService
public abstract class FooServiceBase<Payload> : IFoo<Payload>, global::Bond.Comm.IService
{
public global::System.Collections.Generic.IEnumerable<global::Bond.Comm.ServiceMethodInfo> Methods
{

Просмотреть файл

@ -16,11 +16,11 @@
namespace tests
{
[System.CodeDom.Compiler.GeneratedCode("gbc", "0.4.0.2")]
public class Proxy_Foo<TConnection> : IFoo where TConnection : global::Bond.Comm.IRequestResponseConnection
public class FooProxy<TConnection> : IFoo where TConnection : global::Bond.Comm.IRequestResponseConnection
{
private readonly TConnection m_connection;
public Proxy_Foo(TConnection connection)
public FooProxy(TConnection connection)
{
m_connection = connection;
}

Просмотреть файл

@ -16,7 +16,7 @@
namespace tests
{
[System.CodeDom.Compiler.GeneratedCode("gbc", "0.4.0.2")]
public abstract class FooService : IFoo, global::Bond.Comm.IService
public abstract class FooServiceBase : IFoo, global::Bond.Comm.IService
{
public global::System.Collections.Generic.IEnumerable<global::Bond.Comm.ServiceMethodInfo> Methods
{

Просмотреть файл

@ -8,7 +8,7 @@ namespace UnitTest.SimpleInMem
using System.Threading.Tasks;
using Bond.Comm;
internal class CalculatorServiceImpl : CalculatorService
internal class CalculatorService : CalculatorServiceBase
{
public const string ExpectedExceptionMessage = "This method is expected to throw.";
private const UInt16 DelayMilliseconds = 30;

Просмотреть файл

@ -13,13 +13,13 @@ namespace UnitTest.SimpleInMem
{
private const string m_address = "SimpleInMemTakesAnyRandomConnectionString";
private SimpleInMemTransport m_transport;
private CalculatorServiceImpl m_service;
private CalculatorService m_service;
[SetUp]
public void Init()
{
m_transport = new SimpleInMemTransportBuilder().SetUnhandledExceptionHandler(Transport.DebugExceptionHandler).Construct();
m_service = new CalculatorServiceImpl();
m_service = new CalculatorService();
}
[Test]
@ -41,7 +41,7 @@ namespace UnitTest.SimpleInMem
Assert.True(simpleConnection.ConnectionType == ConnectionType.Client);
var calculatorProxy = new Proxy_Calculator<SimpleInMemConnection>(simpleConnection);
var calculatorProxy = new CalculatorProxy<SimpleInMemConnection>(simpleConnection);
PairedInput input = new PairedInput
{
@ -74,7 +74,7 @@ namespace UnitTest.SimpleInMem
SimpleInMemConnection simpleConnection = (SimpleInMemConnection)connection;
Assert.True(simpleConnection.ConnectionType == ConnectionType.Client);
var calculatorProxy = new Proxy_Calculator<SimpleInMemConnection>(simpleConnection);
var calculatorProxy = new CalculatorProxy<SimpleInMemConnection>(simpleConnection);
PairedInput input = new PairedInput
{
@ -86,7 +86,7 @@ namespace UnitTest.SimpleInMem
Assert.IsTrue(multiplyResponse.IsError);
InternalServerError error = multiplyResponse.Error.Deserialize<InternalServerError>();
Assert.AreEqual((int)ErrorCode.InternalServerError, error.error_code);
Assert.That(error.message, Is.StringContaining(CalculatorServiceImpl.ExpectedExceptionMessage));
Assert.That(error.message, Is.StringContaining(CalculatorService.ExpectedExceptionMessage));
await connection.StopAsync();
}

Просмотреть файл

@ -13,7 +13,7 @@ namespace UnitTest.SimpleInMem
{
private readonly string m_address = "SimpleInMemTakesAnyRandomConnectionString";
private SimpleInMemTransport m_transport;
private CalculatorServiceImpl m_service;
private CalculatorService m_service;
[SetUp]
public void Init()
@ -22,7 +22,7 @@ namespace UnitTest.SimpleInMem
new SimpleInMemTransportBuilder()
.SetUnhandledExceptionHandler(Transport.ToErrorExceptionHandler)
.Construct();
m_service = new CalculatorServiceImpl();
m_service = new CalculatorService();
}
[TearDown]

Просмотреть файл

@ -42,11 +42,11 @@ namespace Bond.Examples.PingPong
var assignAPortEndPoint = new IPEndPoint(IPAddress.Loopback, 0);
var pingPongService = new PingPongServiceImpl();
var pingPongService = new PingPongService();
TcpListener pingPongListener = transport.MakeListener(assignAPortEndPoint);
pingPongListener.AddService(pingPongService);
var reversePingPongService = new ReversePingPongServiceImpl();
var reversePingPongService = new ReversePingPongService();
TcpListener reversePingPongListener = transport.MakeListener(assignAPortEndPoint);
reversePingPongListener.AddService(reversePingPongService);
@ -62,8 +62,8 @@ namespace Bond.Examples.PingPong
private static Task[] MakeRequestsAndPrintAsync(int numRequests)
{
var pingPongProxy = new Proxy_PingPong<TcpConnection>(s_pingConnection);
var reversePingPongProxy = new Proxy_PingPong<TcpConnection>(s_reverseConnection);
var pingPongProxy = new PingPongProxy<TcpConnection>(s_pingConnection);
var reversePingPongProxy = new PingPongProxy<TcpConnection>(s_reverseConnection);
var tasks = new Task[2 * numRequests];
@ -81,7 +81,7 @@ namespace Bond.Examples.PingPong
return tasks;
}
private static async Task DoPingPong(Proxy_PingPong<TcpConnection> proxy, int requestNum, string payload, UInt16 delay)
private static async Task DoPingPong(PingPongProxy<TcpConnection> proxy, int requestNum, string payload, UInt16 delay)
{
var request = new PingRequest { Payload = payload, DelayMilliseconds = delay };
IMessage<PingResponse> message = await proxy.PingAsync(request);

Просмотреть файл

@ -8,7 +8,7 @@ namespace Bond.Examples.PingPong
using System.Threading.Tasks;
using Bond.Comm;
public class PingPongServiceImpl : PingPongService
public class PingPongService : PingPongServiceBase
{
private const UInt16 MaxDelayMilliseconds = 2000;

Просмотреть файл

@ -9,7 +9,7 @@ namespace Bond.Examples.PingPong
using System.Threading.Tasks;
using Bond.Comm;
public class ReversePingPongServiceImpl : PingPongService
public class ReversePingPongService : PingPongServiceBase
{
private const UInt16 MaxDelayMilliseconds = 2000;