Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Dispatcher / EndpointFilterProvider.cs / 1 / EndpointFilterProvider.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Dispatcher
{
using System.Collections.Generic;
using System.ServiceModel.Channels;
using System.Runtime.Serialization;
class EndpointFilterProvider
{
SynchronizedCollection initiatingActions;
object mutex;
public EndpointFilterProvider(params string[] initiatingActions)
{
this.mutex = new object();
this.initiatingActions = new SynchronizedCollection(this.mutex, initiatingActions);
}
public SynchronizedCollection InitiatingActions
{
get { return this.initiatingActions; }
}
public MessageFilter CreateFilter(out int priority)
{
lock (this.mutex)
{
priority = 1;
if (initiatingActions.Count == 0)
return new MatchNoneMessageFilter();
string[] actions = new string[initiatingActions.Count];
int index = 0;
for (int i = 0; i < initiatingActions.Count; i++)
{
string currentAction = initiatingActions[i];
if (currentAction == MessageHeaders.WildcardAction)
{
priority = 0;
return new MatchAllMessageFilter();
}
actions[index] = currentAction;
++index;
}
return new ActionMessageFilter(actions);
}
}
}
}
// 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
- HttpModuleAction.cs
- AnimatedTypeHelpers.cs
- ItemMap.cs
- LinqDataSourceSelectEventArgs.cs
- CommandHelper.cs
- ContractInferenceHelper.cs
- XPathMultyIterator.cs
- IndentedWriter.cs
- PageSettings.cs
- BitmapEffectGeneralTransform.cs
- CounterSample.cs
- WmpBitmapEncoder.cs
- ObjectDataProvider.cs
- X509Chain.cs
- CultureInfoConverter.cs
- ContextProperty.cs
- Symbol.cs
- EntityDesignerUtils.cs
- CustomErrorCollection.cs
- CustomWebEventKey.cs
- Hashtable.cs
- DataFormats.cs
- TargetException.cs
- Rotation3DKeyFrameCollection.cs
- GrammarBuilder.cs
- ProfileSettings.cs
- ItemsPanelTemplate.cs
- CodeMemberEvent.cs
- InputMethod.cs
- LassoHelper.cs
- InvalidPropValue.cs
- InputEventArgs.cs
- OleStrCAMarshaler.cs
- ParseElementCollection.cs
- ManagementObjectSearcher.cs
- LogManagementAsyncResult.cs
- BaseAutoFormat.cs
- NamedPipeChannelListener.cs
- XmlDigitalSignatureProcessor.cs
- SplayTreeNode.cs
- WindowsGraphics2.cs
- OpCodes.cs
- HttpConfigurationContext.cs
- PrintPageEvent.cs
- DynamicMetaObject.cs
- SrgsDocument.cs
- UIElement3DAutomationPeer.cs
- IISMapPath.cs
- IdentitySection.cs
- Component.cs
- CaseInsensitiveHashCodeProvider.cs
- Codec.cs
- DataGrid.cs
- InvokeGenerator.cs
- FormatSettings.cs
- NavigationExpr.cs
- DragDropManager.cs
- DbTransaction.cs
- CompressedStack.cs
- RenderOptions.cs
- TransactedBatchingBehavior.cs
- ArgumentReference.cs
- SubMenuStyleCollectionEditor.cs
- Deserializer.cs
- UserControlCodeDomTreeGenerator.cs
- ADMembershipUser.cs
- TypeExtensionConverter.cs
- OutputScope.cs
- DBConcurrencyException.cs
- AsymmetricKeyExchangeDeformatter.cs
- FormViewPageEventArgs.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- SessionStateItemCollection.cs
- ErrorsHelper.cs
- PtsContext.cs
- TemplateColumn.cs
- StylusPointDescription.cs
- ChangeNode.cs
- SHA256Managed.cs
- CodeGeneratorOptions.cs
- OleDbConnectionFactory.cs
- OutputCacheSettingsSection.cs
- IconBitmapDecoder.cs
- ConfigurationManagerInternal.cs
- SqlNodeAnnotations.cs
- RayMeshGeometry3DHitTestResult.cs
- GlyphInfoList.cs
- InkPresenter.cs
- AttributeEmitter.cs
- SamlAuthenticationClaimResource.cs
- SqlClientPermission.cs
- CodeArrayCreateExpression.cs
- SecurityResources.cs
- BulletedListDesigner.cs
- KeyboardDevice.cs
- RecognitionResult.cs
- XmlAnyElementAttribute.cs
- InputLanguageSource.cs
- ColumnCollection.cs
- PlatformCulture.cs