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 IMessageFilterTable CreateFilterTable()
{
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
- TypeLoadException.cs
- LayoutTable.cs
- ConstrainedDataObject.cs
- CookielessData.cs
- MediaContext.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CollectionViewGroupRoot.cs
- ContactManager.cs
- ComponentManagerBroker.cs
- DbConnectionPool.cs
- SmtpFailedRecipientException.cs
- SuppressedPackageProperties.cs
- TableTextElementCollectionInternal.cs
- QueryCursorEventArgs.cs
- SetterBaseCollection.cs
- ListBox.cs
- TextSpan.cs
- CultureInfoConverter.cs
- WmpBitmapDecoder.cs
- DataGridColumn.cs
- GroupStyle.cs
- DataGridViewBindingCompleteEventArgs.cs
- ReadOnlyDictionary.cs
- DataServiceQueryContinuation.cs
- IPAddress.cs
- KnownAssembliesSet.cs
- FontUnit.cs
- ServiceDescription.cs
- SaveFileDialog.cs
- PasswordBox.cs
- PtsContext.cs
- FunctionMappingTranslator.cs
- SchemaConstraints.cs
- MonthChangedEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- HashJoinQueryOperatorEnumerator.cs
- MouseEventArgs.cs
- RoutedPropertyChangedEventArgs.cs
- ExpandButtonVisibilityConverter.cs
- CompilerWrapper.cs
- filewebrequest.cs
- EmulateRecognizeCompletedEventArgs.cs
- TextTreeRootNode.cs
- AnnotationMap.cs
- ModelTypeConverter.cs
- followingsibling.cs
- WebExceptionStatus.cs
- DynamicMetaObject.cs
- HttpCapabilitiesBase.cs
- QueryOperatorEnumerator.cs
- BitStack.cs
- FixedPageStructure.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- XPathBinder.cs
- BmpBitmapDecoder.cs
- RsaSecurityKey.cs
- ThicknessAnimation.cs
- HMACSHA256.cs
- PerfCounters.cs
- XmlSerializerFactory.cs
- ReliabilityContractAttribute.cs
- TPLETWProvider.cs
- PenCursorManager.cs
- XmlAttributeCache.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- DefinitionBase.cs
- DbConnectionPoolCounters.cs
- JulianCalendar.cs
- OlePropertyStructs.cs
- XmlFormatExtensionAttribute.cs
- DBSchemaTable.cs
- ListDataHelper.cs
- DeploymentExceptionMapper.cs
- RealizedColumnsBlock.cs
- GradientStopCollection.cs
- Viewport3DAutomationPeer.cs
- TouchFrameEventArgs.cs
- dataobject.cs
- Normalization.cs
- SatelliteContractVersionAttribute.cs
- XmlExtensionFunction.cs
- TextEditorTables.cs
- DefaultCommandConverter.cs
- OlePropertyStructs.cs
- FindCompletedEventArgs.cs
- AnnotationHelper.cs
- HitTestWithPointDrawingContextWalker.cs
- CodeTypeParameter.cs
- CapiHashAlgorithm.cs
- ScriptDescriptor.cs
- ThousandthOfEmRealDoubles.cs
- DashStyles.cs
- IndexerNameAttribute.cs
- CheckBoxStandardAdapter.cs
- SqlParameterizer.cs
- CaseInsensitiveOrdinalStringComparer.cs
- PersistenceContextEnlistment.cs
- LockCookie.cs
- Trace.cs
- XmlDataProvider.cs