Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / System.ServiceModel.Activation / System / ServiceModel / Activation / HostedTcpTransportManager.cs / 1305376 / HostedTcpTransportManager.cs
//----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------
namespace System.ServiceModel.Activation
{
using System.ServiceModel.Channels;
using System.Collections.Generic;
using System.Diagnostics;
class HostedTcpTransportManager : SharedTcpTransportManager
{
bool settingsApplied;
Action onViaCallback;
public HostedTcpTransportManager(BaseUriWithWildcard baseAddress)
: base(baseAddress.BaseAddress)
{
this.HostNameComparisonMode = baseAddress.HostNameComparisonMode;
this.onViaCallback = new Action(OnVia);
}
internal void Start(int queueId, Guid token, Action messageReceivedCallback)
{
SetMessageReceivedCallback(messageReceivedCallback);
OnOpenInternal(queueId, token);
}
internal override void OnOpen()
{
// This is intentionally empty.
}
internal override void OnClose(TimeSpan timeout)
{
// This is intentionally empty.
}
internal override void OnAbort()
{
// This is intentionally empty.
}
internal void Stop(TimeSpan timeout)
{
CleanUp(false, timeout);
settingsApplied = false;
}
protected override Action GetOnViaCallback()
{
return this.onViaCallback;
}
void OnVia(Uri address)
{
Debug.Print("HostedTcpTransportManager.OnVia() address: " + address + " calling EnsureServiceAvailable()");
ServiceHostingEnvironment.EnsureServiceAvailable(address.LocalPath);
}
protected override void OnSelecting(TcpChannelListener channelListener)
{
if (settingsApplied)
{
return;
}
lock (ThisLock)
{
if (settingsApplied)
{
// Use the first one.
return;
}
this.ApplyListenerSettings(channelListener);
settingsApplied = true;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- mongolianshape.cs
- WindowsListViewGroupHelper.cs
- XhtmlBasicPageAdapter.cs
- Utils.cs
- DivideByZeroException.cs
- VisualTreeUtils.cs
- TypeDescriptionProviderAttribute.cs
- ExpressionSelection.cs
- SHA512Managed.cs
- XmlReaderSettings.cs
- DesignerWidgets.cs
- mediapermission.cs
- ResetableIterator.cs
- ValidationError.cs
- IdleTimeoutMonitor.cs
- WebPartTransformerAttribute.cs
- UpdatePanelTrigger.cs
- newinstructionaction.cs
- ObjectAnimationBase.cs
- InvokeBase.cs
- SynchronizingStream.cs
- ProcessInfo.cs
- ChtmlLinkAdapter.cs
- KeyFrames.cs
- HtmlInputHidden.cs
- DragDeltaEventArgs.cs
- GeometryValueSerializer.cs
- XPathSelfQuery.cs
- TextParentUndoUnit.cs
- ThumbAutomationPeer.cs
- DockProviderWrapper.cs
- RelativeSource.cs
- ECDiffieHellman.cs
- DataGridViewCellFormattingEventArgs.cs
- DeflateEmulationStream.cs
- EventRouteFactory.cs
- SessionStateModule.cs
- milrender.cs
- CanExpandCollapseAllConverter.cs
- HitTestFilterBehavior.cs
- DiscoveryClientElement.cs
- SchemaMapping.cs
- UniqueEventHelper.cs
- XmlConvert.cs
- HttpValueCollection.cs
- FileDialogPermission.cs
- DialogResultConverter.cs
- DataGridViewCellLinkedList.cs
- RijndaelManaged.cs
- PerformanceCountersElement.cs
- CharConverter.cs
- ContourSegment.cs
- GridSplitter.cs
- HtmlControlAdapter.cs
- WebProxyScriptElement.cs
- QilList.cs
- StoreItemCollection.cs
- ParsedAttributeCollection.cs
- PersonalizationDictionary.cs
- ExecutedRoutedEventArgs.cs
- AdRotator.cs
- TextBlockAutomationPeer.cs
- UIElement3D.cs
- StickyNoteAnnotations.cs
- AspProxy.cs
- TextRangeEditLists.cs
- TextMetrics.cs
- GuidTagList.cs
- MachineKey.cs
- ConnectionPointCookie.cs
- DesignBindingConverter.cs
- IndexingContentUnit.cs
- CodeNamespaceImportCollection.cs
- PagedDataSource.cs
- Pair.cs
- Graphics.cs
- ItemsControlAutomationPeer.cs
- Cursors.cs
- DocumentViewerHelper.cs
- CodeAttributeDeclaration.cs
- ConstructorNeedsTagAttribute.cs
- WebPartUserCapability.cs
- StoreItemCollection.cs
- XmlCharType.cs
- GeometryModel3D.cs
- GridViewCancelEditEventArgs.cs
- DocumentPageViewAutomationPeer.cs
- XmlSubtreeReader.cs
- wpf-etw.cs
- MessageParameterAttribute.cs
- AddingNewEventArgs.cs
- objectquery_tresulttype.cs
- BigInt.cs
- MSAANativeProvider.cs
- HostedElements.cs
- CLRBindingWorker.cs
- XmlWrappingReader.cs
- SoapHeaderException.cs
- AccessKeyManager.cs
- WebConfigurationManager.cs