Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Routing / System / ServiceModel / Routing / Configuration / RoutingExtensionElement.cs / 1305376 / RoutingExtensionElement.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.ServiceModel.Routing.Configuration { using System; using System.Linq; using System.Configuration; using System.Diagnostics.CodeAnalysis; using System.Runtime; using System.ServiceModel.Channels; using System.ServiceModel.Configuration; using System.ServiceModel.Description; public sealed class RoutingExtensionElement : BehaviorExtensionElement { public RoutingExtensionElement() { this.RouteOnHeadersOnly = RoutingConfiguration.DefaultRouteOnHeadersOnly; } [SuppressMessage(FxCop.Category.Configuration, FxCop.Rule.ConfigurationPropertyAttributeRule, Justification = "this is not a configuration property")] public override Type BehaviorType { get { return typeof(RoutingBehavior); } } [ConfigurationProperty(ConfigurationStrings.RouteOnHeadersOnly, DefaultValue = RoutingConfiguration.DefaultRouteOnHeadersOnly, Options = ConfigurationPropertyOptions.None)] public bool RouteOnHeadersOnly { get { return (bool)this[ConfigurationStrings.RouteOnHeadersOnly]; } set { this[ConfigurationStrings.RouteOnHeadersOnly] = value; } } [SuppressMessage(FxCop.Category.Configuration, FxCop.Rule.ConfigurationValidatorAttributeRule, Justification = "fxcop didn't like [StringValidator(MinLength = 0)]")] [ConfigurationProperty(ConfigurationStrings.FilterTableName, DefaultValue = null)] public string FilterTableName { get { return (string)this[ConfigurationStrings.FilterTableName]; } set { this[ConfigurationStrings.FilterTableName] = value; } } [ConfigurationProperty(ConfigurationStrings.SoapProcessingEnabled, DefaultValue = RoutingConfiguration.DefaultSoapProcessingEnabled)] public bool SoapProcessingEnabled { get { return (bool)this[ConfigurationStrings.SoapProcessingEnabled]; } set { this[ConfigurationStrings.SoapProcessingEnabled] = value; } } protected internal override object CreateBehavior() { RoutingConfiguration config; if (string.IsNullOrEmpty(this.FilterTableName)) { config = new RoutingConfiguration(); config.RouteOnHeadersOnly = this.RouteOnHeadersOnly; } else { config = new RoutingConfiguration(RoutingSection.CreateFilterTable(this.FilterTableName), this.RouteOnHeadersOnly); } config.SoapProcessingEnabled = this.SoapProcessingEnabled; RoutingBehavior behavior = new RoutingBehavior(config); //behavior.Impersonation = this.Impersonation; return behavior; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DependencyPropertyKind.cs
- EntityParameter.cs
- SmiXetterAccessMap.cs
- EntityDataSourceColumn.cs
- CursorInteropHelper.cs
- XpsDocument.cs
- NullReferenceException.cs
- FileAuthorizationModule.cs
- IndexerNameAttribute.cs
- WebPartsPersonalizationAuthorization.cs
- TreeNodeCollectionEditorDialog.cs
- BindUriHelper.cs
- CompilerResults.cs
- GPRECT.cs
- TextBoxView.cs
- Asn1IntegerConverter.cs
- InvalidWMPVersionException.cs
- DataBoundControlHelper.cs
- FormViewInsertEventArgs.cs
- ScalarOps.cs
- Codec.cs
- FormDocumentDesigner.cs
- CollectionEditVerbManager.cs
- PassportPrincipal.cs
- DataControlButton.cs
- SqlWebEventProvider.cs
- IItemProperties.cs
- StrokeNodeOperations.cs
- TerminatorSinks.cs
- PanelStyle.cs
- ColumnHeaderConverter.cs
- ReliableMessagingVersion.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- TextTreeRootTextBlock.cs
- AnalyzedTree.cs
- ProviderBase.cs
- TemplateControlParser.cs
- DataBindingCollection.cs
- ContextBase.cs
- Ticks.cs
- PathFigureCollectionValueSerializer.cs
- DataGridViewAddColumnDialog.cs
- WindowsImpersonationContext.cs
- ControlPropertyNameConverter.cs
- CompositeFontParser.cs
- SQLBytes.cs
- Overlapped.cs
- EntityDataSourceWrapperCollection.cs
- AppDomainUnloadedException.cs
- UndoManager.cs
- BreakSafeBase.cs
- TemplateBuilder.cs
- ColumnBinding.cs
- UiaCoreTypesApi.cs
- EntityContainerEmitter.cs
- FixedHyperLink.cs
- DataRecordInfo.cs
- altserialization.cs
- UserValidatedEventArgs.cs
- MimeObjectFactory.cs
- ToolStripItemImageRenderEventArgs.cs
- PropertyChangedEventArgs.cs
- GlyphTypeface.cs
- AllMembershipCondition.cs
- OdbcErrorCollection.cs
- ObfuscateAssemblyAttribute.cs
- AuthenticationManager.cs
- ChangeNode.cs
- TextUtf8RawTextWriter.cs
- LineInfo.cs
- _SslState.cs
- ItemsControlAutomationPeer.cs
- EdmProviderManifest.cs
- ImportContext.cs
- Image.cs
- ResourceDictionary.cs
- SolidColorBrush.cs
- StylusTouchDevice.cs
- CharacterBuffer.cs
- SymbolEqualComparer.cs
- QueryReaderSettings.cs
- RsaKeyGen.cs
- SqlDataAdapter.cs
- SerializationHelper.cs
- CommentEmitter.cs
- XPathDocumentBuilder.cs
- PageSettings.cs
- _AuthenticationState.cs
- LeafCellTreeNode.cs
- QueryStringParameter.cs
- FlowPosition.cs
- CommandEventArgs.cs
- PermissionSetTriple.cs
- ReflectTypeDescriptionProvider.cs
- XmlUtil.cs
- ExpressionNode.cs
- TemplateControlCodeDomTreeGenerator.cs
- TcpClientChannel.cs
- KeyGesture.cs
- NewArrayExpression.cs