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
- CallbackDebugBehavior.cs
- WebPartUserCapability.cs
- Latin1Encoding.cs
- NullableDoubleAverageAggregationOperator.cs
- MSAAEventDispatcher.cs
- Hashtable.cs
- WinEventQueueItem.cs
- HtmlButton.cs
- XPathParser.cs
- ServicePrincipalNameElement.cs
- AliasGenerator.cs
- SerializationFieldInfo.cs
- InstanceHandleReference.cs
- ListSourceHelper.cs
- Popup.cs
- CutCopyPasteHelper.cs
- CreateParams.cs
- XmlILStorageConverter.cs
- BevelBitmapEffect.cs
- Int32AnimationUsingKeyFrames.cs
- ImageAnimator.cs
- PropertyNames.cs
- DynamicVirtualDiscoSearcher.cs
- ConstrainedGroup.cs
- GridViewCellAutomationPeer.cs
- XhtmlBasicPhoneCallAdapter.cs
- OutputCacheProfileCollection.cs
- CodeIdentifiers.cs
- EntityViewContainer.cs
- ToolboxComponentsCreatedEventArgs.cs
- TextTreeRootTextBlock.cs
- DataBinding.cs
- GeometryModel3D.cs
- ConnectionInterfaceCollection.cs
- EdmConstants.cs
- MembershipSection.cs
- SafeLibraryHandle.cs
- SendingRequestEventArgs.cs
- ThreadAbortException.cs
- ColumnWidthChangingEvent.cs
- RequestCache.cs
- UpdateEventArgs.cs
- MouseCaptureWithinProperty.cs
- RoleManagerSection.cs
- WorkflowServiceBuildProvider.cs
- ResourceSet.cs
- httpstaticobjectscollection.cs
- ViewStateModeByIdAttribute.cs
- CustomErrorCollection.cs
- SqlCacheDependencySection.cs
- Timer.cs
- RadioButtonAutomationPeer.cs
- BitmapEffectGeneralTransform.cs
- XmlSchemaAppInfo.cs
- BufferedGraphicsContext.cs
- WebRequestModuleElement.cs
- EdmSchemaAttribute.cs
- Visual.cs
- DependencyProperty.cs
- ScriptingProfileServiceSection.cs
- Expression.cs
- DefaultTextStoreTextComposition.cs
- BypassElement.cs
- Function.cs
- RegisteredDisposeScript.cs
- TemplateColumn.cs
- CodeVariableDeclarationStatement.cs
- SID.cs
- SocketInformation.cs
- StringBlob.cs
- RegexGroup.cs
- Processor.cs
- Command.cs
- DateTimeConstantAttribute.cs
- ClickablePoint.cs
- QilVisitor.cs
- AppDomainManager.cs
- ListViewItem.cs
- SecurityImpersonationBehavior.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ListView.cs
- ConsumerConnectionPointCollection.cs
- Int32AnimationBase.cs
- ObservableCollection.cs
- ThicknessAnimationUsingKeyFrames.cs
- DocumentViewer.cs
- PersonalizationDictionary.cs
- Environment.cs
- HijriCalendar.cs
- __Filters.cs
- XmlQualifiedName.cs
- WindowsRegion.cs
- StrokeCollectionConverter.cs
- ActivityValidationServices.cs
- XsltCompileContext.cs
- IntegerValidatorAttribute.cs
- ProxyGenerator.cs
- CodeConditionStatement.cs
- LayoutUtils.cs
- StringArrayConverter.cs