mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.SqlXml System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Xml System.Xml.Linq
67 lines
2.3 KiB
C#
67 lines
2.3 KiB
C#
//------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//------------------------------------------------------------
|
|
namespace System.ServiceModel.Channels
|
|
{
|
|
using System.Runtime;
|
|
using System.ServiceModel;
|
|
|
|
public abstract class BindingElement
|
|
{
|
|
protected BindingElement()
|
|
{
|
|
}
|
|
|
|
protected BindingElement(BindingElement elementToBeCloned)
|
|
{
|
|
}
|
|
|
|
public abstract BindingElement Clone();
|
|
|
|
public virtual IChannelFactory<TChannel> BuildChannelFactory<TChannel>(BindingContext context)
|
|
{
|
|
if (context == null)
|
|
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context");
|
|
|
|
return context.BuildInnerChannelFactory<TChannel>();
|
|
}
|
|
|
|
public virtual IChannelListener<TChannel> BuildChannelListener<TChannel>(BindingContext context) where TChannel : class, IChannel
|
|
{
|
|
if (context == null)
|
|
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context");
|
|
|
|
return context.BuildInnerChannelListener<TChannel>();
|
|
}
|
|
|
|
public virtual bool CanBuildChannelFactory<TChannel>(BindingContext context)
|
|
{
|
|
if (context == null)
|
|
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context");
|
|
|
|
return context.CanBuildInnerChannelFactory<TChannel>();
|
|
}
|
|
|
|
public virtual bool CanBuildChannelListener<TChannel>(BindingContext context) where TChannel : class, IChannel
|
|
{
|
|
if (context == null)
|
|
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context");
|
|
|
|
return context.CanBuildInnerChannelListener<TChannel>();
|
|
}
|
|
|
|
public abstract T GetProperty<T>(BindingContext context) where T : class;
|
|
|
|
internal T GetIndividualProperty<T>() where T : class
|
|
{
|
|
return this.GetProperty<T>(new BindingContext(new CustomBinding(), new BindingParameterCollection()));
|
|
}
|
|
|
|
internal virtual bool IsMatch(BindingElement b)
|
|
{
|
|
Fx.Assert(true, "Should not be called unless this binding element is used in one of the standard bindings. In which case, please re-implement the IsMatch() method.");
|
|
return false;
|
|
}
|
|
}
|
|
}
|