Xamarin Public Jenkins (auto-signing) 73ee7591e8 Imported Upstream version 6.8.0.73
Former-commit-id: d18deab1b47cfd3ad8cba82b3f37d00eec2170af
2019-12-10 18:00:56 +00:00

75 lines
1.5 KiB
C#

//
// MonoTests.Remoting.TcpCalls.cs
//
// Author: Lluis Sanchez Gual (lluis@ximian.com)
//
// 2003 (C) Copyright, Ximian, Inc.
//
using System;
using System.Collections;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using NUnit.Framework;
namespace MonoTests.Remoting
{
[TestFixture]
public class TcpSyncCallTest : SyncCallTest
{
public override ChannelManager CreateChannelManager ()
{
return new TcpChannelManager ();
}
}
[TestFixture]
public class TcpAsyncCallTest : AsyncCallTest
{
public override ChannelManager CreateChannelManager ()
{
return new TcpChannelManager ();
}
}
[TestFixture]
public class TcpReflectionCallTest : ReflectionCallTest
{
public override ChannelManager CreateChannelManager ()
{
return new TcpChannelManager ();
}
}
[TestFixture]
public class TcpDelegateCallTest : DelegateCallTest
{
public override ChannelManager CreateChannelManager ()
{
return new TcpChannelManager ();
}
}
[Serializable]
public class TcpChannelManager : ChannelManager
{
public override IChannelSender CreateClientChannel ()
{
Hashtable props = new Hashtable ();
props["port"] = 0;
props["bindTo"] = "127.0.0.1";
return new TcpChannel (props, null, null);
}
public override IChannelReceiver CreateServerChannel ()
{
Hashtable props = new Hashtable ();
props["port"] = 0;
props["bindTo"] = "127.0.0.1";
return new TcpChannel (props, null, null);
}
}
}