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; ActiononViaCallback; 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
- CellTreeNodeVisitors.cs
- ConnectionPointCookie.cs
- Focus.cs
- TypeRefElement.cs
- UnsafeNativeMethods.cs
- NamedPipeTransportElement.cs
- BindableAttribute.cs
- LambdaCompiler.Unary.cs
- ProtocolImporter.cs
- OracleRowUpdatingEventArgs.cs
- XsltFunctions.cs
- DataGridItemCollection.cs
- XmlChoiceIdentifierAttribute.cs
- BufferAllocator.cs
- DataSourceHelper.cs
- XmlSchemaObjectTable.cs
- RepeatButton.cs
- DataServiceRequest.cs
- Speller.cs
- MessageAction.cs
- ToolZone.cs
- WorkBatch.cs
- VisualState.cs
- datacache.cs
- UIElement.cs
- ContentHostHelper.cs
- AutoGeneratedField.cs
- cookie.cs
- TokenFactoryCredential.cs
- WebPartTransformer.cs
- ApplicationProxyInternal.cs
- XmlDictionaryReaderQuotas.cs
- Rotation3DAnimation.cs
- ObjectDataProvider.cs
- PassportAuthenticationEventArgs.cs
- SystemFonts.cs
- StrongNameMembershipCondition.cs
- Content.cs
- TypeToken.cs
- SharedMemory.cs
- FileDetails.cs
- SetStoryboardSpeedRatio.cs
- XdrBuilder.cs
- NullableDoubleAverageAggregationOperator.cs
- XmlNodeChangedEventManager.cs
- WindowsEditBoxRange.cs
- MouseActionConverter.cs
- ValidationPropertyAttribute.cs
- GACIdentityPermission.cs
- MissingMemberException.cs
- PersonalizationStateInfo.cs
- DesignerVerbCollection.cs
- BinaryMessageEncodingBindingElement.cs
- EdmValidator.cs
- PackageFilter.cs
- ParseHttpDate.cs
- LinearGradientBrush.cs
- TrackingRecordPreFilter.cs
- TextRangeEdit.cs
- ISessionStateStore.cs
- CssTextWriter.cs
- _ChunkParse.cs
- CodeTypeMember.cs
- OleDbTransaction.cs
- GeometryModel3D.cs
- MergePropertyDescriptor.cs
- DrawListViewColumnHeaderEventArgs.cs
- IsolatedStorageFile.cs
- ParseChildrenAsPropertiesAttribute.cs
- SqlDataSourceView.cs
- SystemIPInterfaceProperties.cs
- ListControlConvertEventArgs.cs
- CollectionChangeEventArgs.cs
- BaseUriHelper.cs
- TableRow.cs
- TimeoutValidationAttribute.cs
- DataSourceControlBuilder.cs
- ProtocolImporter.cs
- ClientBuildManager.cs
- XmlDocumentSchema.cs
- SemanticBasicElement.cs
- BaseHashHelper.cs
- InkCanvasSelection.cs
- IndexedString.cs
- TrackingMemoryStreamFactory.cs
- LambdaCompiler.Lambda.cs
- WebPartDescription.cs
- PublisherIdentityPermission.cs
- ExpressionEditorAttribute.cs
- InfoCardUIAgent.cs
- ExtenderProviderService.cs
- XmlValidatingReader.cs
- ParameterCollection.cs
- SoapAttributeOverrides.cs
- CodeSubDirectoriesCollection.cs
- SqlTypesSchemaImporter.cs
- InvalidateEvent.cs
- UserControlCodeDomTreeGenerator.cs
- XmlBinaryReader.cs
- DataGridAutoFormatDialog.cs