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
72 lines
2.4 KiB
C#
72 lines
2.4 KiB
C#
//----------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//----------------------------------------------------------------
|
|
|
|
namespace System.ServiceModel.Routing
|
|
{
|
|
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Runtime;
|
|
using System.ServiceModel;
|
|
using System.ServiceModel.Dispatcher;
|
|
|
|
[Fx.Tag.XamlVisible(false)]
|
|
public sealed class RoutingExtension : IExtension<ServiceHostBase>
|
|
{
|
|
volatile RoutingConfiguration configuration;
|
|
|
|
internal RoutingExtension(RoutingConfiguration configuration)
|
|
{
|
|
Fx.Assert(configuration != null, "Configuration required");
|
|
|
|
if (TD.RoutingServiceDisplayConfigIsEnabled())
|
|
{
|
|
TD.RoutingServiceDisplayConfig(
|
|
configuration.RouteOnHeadersOnly.ToString(TD.Culture),
|
|
configuration.SoapProcessingEnabled.ToString(TD.Culture),
|
|
configuration.EnsureOrderedDispatch.ToString(TD.Culture));
|
|
}
|
|
this.configuration = configuration;
|
|
}
|
|
|
|
[SuppressMessage(FxCop.Category.Performance, FxCop.Rule.AvoidUncalledPrivateCode, Justification = "This gets called in RoutingService..ctor")]
|
|
internal RoutingConfiguration RoutingConfiguration
|
|
{
|
|
get
|
|
{
|
|
return this.configuration;
|
|
}
|
|
}
|
|
|
|
void IExtension<ServiceHostBase>.Attach(ServiceHostBase owner)
|
|
{
|
|
}
|
|
|
|
void IExtension<ServiceHostBase>.Detach(ServiceHostBase owner)
|
|
{
|
|
}
|
|
|
|
public void ApplyConfiguration(RoutingConfiguration routingConfiguration)
|
|
{
|
|
if (routingConfiguration == null)
|
|
{
|
|
throw FxTrace.Exception.ArgumentNull("routingConfiguration");
|
|
}
|
|
|
|
if (TD.RoutingServiceConfigurationAppliedIsEnabled())
|
|
{
|
|
TD.RoutingServiceConfigurationApplied();
|
|
}
|
|
if (TD.RoutingServiceDisplayConfigIsEnabled())
|
|
{
|
|
TD.RoutingServiceDisplayConfig(
|
|
routingConfiguration.RouteOnHeadersOnly.ToString(TD.Culture),
|
|
routingConfiguration.SoapProcessingEnabled.ToString(TD.Culture),
|
|
routingConfiguration.EnsureOrderedDispatch.ToString(TD.Culture));
|
|
}
|
|
|
|
this.configuration = routingConfiguration;
|
|
}
|
|
}
|
|
}
|