Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Dispatcher / AndMessageFilter.cs / 1 / AndMessageFilter.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Dispatcher { using System; using System.ServiceModel.Channels; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Security.Cryptography; using System.ServiceModel.Security; using System.Xml; internal class AndMessageFilter : MessageFilter { MessageFilter filter1; MessageFilter filter2; public AndMessageFilter(MessageFilter filter1, MessageFilter filter2) { if (filter1 == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("filter1"); if (filter2 == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("filter2"); this.filter1 = filter1; this.filter2 = filter2; } public MessageFilter Filter1 { get { return this.filter1; } } public MessageFilter Filter2 { get { return this.filter2; } } protected internal override IMessageFilterTableCreateFilterTable () { return new AndMessageFilterTable (); } public override bool Match(Message message) { if(message == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("message"); } return this.filter1.Match(message) && this.filter2.Match(message); } internal bool Match(Message message, out bool addressMatched) { if(message == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("message"); } if (this.filter1.Match(message)) { addressMatched = true; return this.filter2.Match(message); } else { addressMatched = false; return false; } } public override bool Match(MessageBuffer messageBuffer) { if(messageBuffer == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("messageBuffer"); } return this.filter1.Match(messageBuffer) && this.filter2.Match(messageBuffer); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignObjectWrapper.cs
- Resources.Designer.cs
- ContextMenuStrip.cs
- _FixedSizeReader.cs
- TemplateColumn.cs
- AttributeProviderAttribute.cs
- CompilerGlobalScopeAttribute.cs
- RectKeyFrameCollection.cs
- LambdaCompiler.Unary.cs
- contentDescriptor.cs
- EventPropertyMap.cs
- OLEDB_Util.cs
- ProfileProvider.cs
- FixedHighlight.cs
- DataTableMapping.cs
- LogConverter.cs
- MissingManifestResourceException.cs
- TableStyle.cs
- AppDomain.cs
- EventLogQuery.cs
- ProcessHostMapPath.cs
- ControlParameter.cs
- SetState.cs
- ToolboxSnapDragDropEventArgs.cs
- DefaultValueAttribute.cs
- UnsafeNativeMethods.cs
- CustomValidator.cs
- SystemNetHelpers.cs
- ScriptingSectionGroup.cs
- XmlReader.cs
- WebPartDisplayMode.cs
- TypedAsyncResult.cs
- RootBuilder.cs
- ShaderRenderModeValidation.cs
- ErrorWebPart.cs
- FlowDocument.cs
- Cloud.cs
- PreloadedPackages.cs
- ProcessModelSection.cs
- xdrvalidator.cs
- XmlAtomicValue.cs
- EntityDataSourceDesigner.cs
- RectangleConverter.cs
- Line.cs
- StringUtil.cs
- JavaScriptString.cs
- SkewTransform.cs
- DataControlFieldsEditor.cs
- ReadOnlyDataSourceView.cs
- SourceFileInfo.cs
- SerializationInfoEnumerator.cs
- TabControl.cs
- SqlDataSource.cs
- QueueSurrogate.cs
- ServiceInfo.cs
- ISCIIEncoding.cs
- AttributedMetaModel.cs
- ContractMapping.cs
- ContentType.cs
- KnownTypes.cs
- ColumnCollectionEditor.cs
- SettingsPropertyCollection.cs
- IntSecurity.cs
- CodeDomConfigurationHandler.cs
- DescendantBaseQuery.cs
- ObjectTag.cs
- FilterableAttribute.cs
- EventEntry.cs
- EditorPart.cs
- Attachment.cs
- GenerateTemporaryTargetAssembly.cs
- SqlDataSourceEnumerator.cs
- Win32.cs
- WebContentFormatHelper.cs
- DbConnectionStringCommon.cs
- DesignerVerbCollection.cs
- CellLabel.cs
- BadImageFormatException.cs
- ModelItemCollection.cs
- PropertyTabChangedEvent.cs
- XmlSchemaObject.cs
- WebPartConnectionsConfigureVerb.cs
- _AutoWebProxyScriptHelper.cs
- MethodImplAttribute.cs
- SafeTimerHandle.cs
- LongCountAggregationOperator.cs
- NoPersistProperty.cs
- MarginsConverter.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- ConnectionStringsExpressionBuilder.cs
- AQNBuilder.cs
- EUCJPEncoding.cs
- GetCardDetailsRequest.cs
- TemplateManager.cs
- SafeTimerHandle.cs
- CopyAction.cs
- ScriptingSectionGroup.cs
- ExceptionUtil.cs
- BaseTemplateCodeDomTreeGenerator.cs
- KeyInstance.cs