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
- RegexMatch.cs
- XmlRawWriterWrapper.cs
- PersonalizationStateInfoCollection.cs
- counter.cs
- AsyncDataRequest.cs
- FusionWrap.cs
- XmlAttributes.cs
- XpsLiterals.cs
- QilXmlWriter.cs
- XmlWriterTraceListener.cs
- ContentDisposition.cs
- SynchronousChannelMergeEnumerator.cs
- SqlDataSourceSelectingEventArgs.cs
- MSAANativeProvider.cs
- ApplySecurityAndSendAsyncResult.cs
- HostExecutionContextManager.cs
- ProxyRpc.cs
- COM2IPerPropertyBrowsingHandler.cs
- OdbcEnvironment.cs
- SharedStatics.cs
- ProfileSettings.cs
- ThreadNeutralSemaphore.cs
- Hash.cs
- WebColorConverter.cs
- BitmapData.cs
- SerialPinChanges.cs
- TextEmbeddedObject.cs
- ConditionChanges.cs
- SByteStorage.cs
- SemanticBasicElement.cs
- HttpListenerPrefixCollection.cs
- _SslState.cs
- AssemblyAttributes.cs
- WrappedIUnknown.cs
- IdnElement.cs
- QueryableDataSourceView.cs
- TemplateField.cs
- LateBoundBitmapDecoder.cs
- MappingException.cs
- DataGridViewRowsAddedEventArgs.cs
- SettingsAttributeDictionary.cs
- PropertyChangeTracker.cs
- DbConnectionPoolIdentity.cs
- WebPartConnectionsCloseVerb.cs
- HorizontalAlignConverter.cs
- InvokeProviderWrapper.cs
- Cursors.cs
- ProcessingInstructionAction.cs
- XmlSchemaSubstitutionGroup.cs
- SamlSubject.cs
- TimeZone.cs
- ComponentCollection.cs
- DNS.cs
- PropertiesTab.cs
- ClientEventManager.cs
- InheritanceAttribute.cs
- FixedSOMTable.cs
- CopyNodeSetAction.cs
- AutomationPatternInfo.cs
- IOException.cs
- KeyNameIdentifierClause.cs
- SendMessageChannelCache.cs
- FlowLayoutSettings.cs
- FtpRequestCacheValidator.cs
- XpsFilter.cs
- HMACSHA512.cs
- ImmutableCommunicationTimeouts.cs
- DebuggerAttributes.cs
- PropertyItemInternal.cs
- DataObjectFieldAttribute.cs
- FormViewUpdateEventArgs.cs
- ItemsPresenter.cs
- SspiNegotiationTokenProvider.cs
- XmlSubtreeReader.cs
- SHA1CryptoServiceProvider.cs
- dataobject.cs
- XPathAxisIterator.cs
- KeySpline.cs
- ListViewCancelEventArgs.cs
- QuaternionConverter.cs
- WebPartDescription.cs
- ConnectionInterfaceCollection.cs
- AssemblyCacheEntry.cs
- BamlLocalizableResourceKey.cs
- RegexGroupCollection.cs
- LifetimeManager.cs
- ClientScriptManager.cs
- RolePrincipal.cs
- EdmMember.cs
- FindCriteriaCD1.cs
- PageAsyncTaskManager.cs
- QueryExpr.cs
- WebConvert.cs
- WebPartDescriptionCollection.cs
- TimeSpan.cs
- ExpressionBindings.cs
- XmlEncodedRawTextWriter.cs
- SupportsEventValidationAttribute.cs
- MenuItem.cs
- ListBase.cs