mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
It was set by xamarin-macios when they were still taking the raw .cs source files but since we switched to prebuilt binaries we need to replace it with some define we're actually setting in Mono. Most cases can be replaced by just XAMMAC_4_5 since MOBILE is defined on the xammac profile.
36 lines
941 B
C#
36 lines
941 B
C#
#if !MOBILE && !XAMMAC_4_5
|
|
using System;
|
|
using System.IO;
|
|
using System.Runtime.Serialization;
|
|
using System.ServiceModel;
|
|
using System.ServiceModel.Channels;
|
|
using System.ServiceModel.Description;
|
|
using System.ServiceModel.Dispatcher;
|
|
using System.ServiceModel.Web;
|
|
using System.Text;
|
|
using NUnit.Framework;
|
|
|
|
namespace MonoTests.System.ServiceModel.Description
|
|
{
|
|
[TestFixture]
|
|
public class WebHttpEndpointTest
|
|
{
|
|
[Test]
|
|
public void ReplaceBinding1 ()
|
|
{
|
|
var se = new WebHttpEndpoint (ContractDescription.GetContract (typeof (IMetadataExchange)), null);
|
|
se.Binding = new NetTcpBinding (); // this does not throw exception yet.
|
|
}
|
|
|
|
[Test]
|
|
[ExpectedException (typeof (InvalidOperationException))]
|
|
public void ReplaceBinding2 ()
|
|
{
|
|
var se = new WebHttpEndpoint (ContractDescription.GetContract (typeof (IMetadataExchange)), null);
|
|
se.Binding = new NetTcpBinding ();
|
|
se.WriteEncoding = Encoding.UTF8;
|
|
}
|
|
}
|
|
}
|
|
#endif
|