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
- DrawItemEvent.cs
- WebDescriptionAttribute.cs
- BoundingRectTracker.cs
- XmlValidatingReader.cs
- GridViewActionList.cs
- ToolStripScrollButton.cs
- UserMapPath.cs
- HitTestFilterBehavior.cs
- ControlPaint.cs
- TransactionContextManager.cs
- BitmapDecoder.cs
- PropertyChangingEventArgs.cs
- WorkflowRuntimeElement.cs
- DatePickerDateValidationErrorEventArgs.cs
- Compilation.cs
- TextSelectionHighlightLayer.cs
- TextDecorations.cs
- OpCellTreeNode.cs
- KeyManager.cs
- TimeZone.cs
- BooleanExpr.cs
- UrlPath.cs
- ToolStripHighContrastRenderer.cs
- CommonGetThemePartSize.cs
- XmlSchemaDocumentation.cs
- XmlnsDictionary.cs
- FixedSOMTableCell.cs
- RayHitTestParameters.cs
- DefaultClaimSet.cs
- SafeNativeMethods.cs
- StructuralType.cs
- TreeNodeStyleCollection.cs
- SelectedDatesCollection.cs
- SynchronizationLockException.cs
- AxisAngleRotation3D.cs
- Triplet.cs
- ResourceExpressionBuilder.cs
- BuildManager.cs
- Variable.cs
- SqlInfoMessageEvent.cs
- Ops.cs
- DependencyPropertyConverter.cs
- FileEnumerator.cs
- ListViewItemSelectionChangedEvent.cs
- UpdateTracker.cs
- PersonalizationStateQuery.cs
- DataGridHeaderBorder.cs
- ToolStripSettings.cs
- AtlasWeb.Designer.cs
- GlyphRunDrawing.cs
- ProxyGenerator.cs
- IpcManager.cs
- X509CertificateRecipientClientCredential.cs
- SingleSelectRootGridEntry.cs
- RoleGroup.cs
- PriorityBindingExpression.cs
- OdbcConnectionPoolProviderInfo.cs
- ConfigurationPropertyAttribute.cs
- EntitySqlQueryCacheEntry.cs
- XomlCompilerError.cs
- Base64Encoder.cs
- HttpResponseHeader.cs
- WindowsFormsHostAutomationPeer.cs
- CodeIdentifier.cs
- DrawingAttributeSerializer.cs
- Single.cs
- OutputCacheProfile.cs
- EmptyEnumerator.cs
- NetDataContractSerializer.cs
- DeviceContext.cs
- SurrogateChar.cs
- Stylus.cs
- RealizedColumnsBlock.cs
- PasswordTextNavigator.cs
- XhtmlConformanceSection.cs
- XmlTextReader.cs
- PhonemeConverter.cs
- Timeline.cs
- WindowsFormsHost.cs
- DataControlFieldCell.cs
- Rotation3DKeyFrameCollection.cs
- CodeMemberProperty.cs
- TagMapCollection.cs
- PropertyPathConverter.cs
- InputLanguage.cs
- ApplicationBuildProvider.cs
- StringSource.cs
- XmlArrayAttribute.cs
- DataRowCollection.cs
- infer.cs
- StyleModeStack.cs
- ImageInfo.cs
- Rules.cs
- OleDbErrorCollection.cs
- DrawingBrush.cs
- XPathAncestorQuery.cs
- AccessorTable.cs
- QueryCreatedEventArgs.cs
- MetadataPropertyCollection.cs
- XPathParser.cs