Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // 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
- TargetParameterCountException.cs
- EnumMember.cs
- XmlSchemaSimpleContent.cs
- SoapMessage.cs
- X509ChainPolicy.cs
- ReadOnlyCollectionBase.cs
- UniqueConstraint.cs
- TdsParserSafeHandles.cs
- DBConcurrencyException.cs
- HttpApplication.cs
- EntityUtil.cs
- PageAsyncTaskManager.cs
- ListItemParagraph.cs
- SqlDataSourceDesigner.cs
- GatewayIPAddressInformationCollection.cs
- SqlAggregateChecker.cs
- Script.cs
- XmlResolver.cs
- SequentialUshortCollection.cs
- ellipse.cs
- XmlSchemaObjectTable.cs
- TextTreePropertyUndoUnit.cs
- PropertyGridEditorPart.cs
- dataprotectionpermission.cs
- QualifiedCellIdBoolean.cs
- SpecialNameAttribute.cs
- CodeObject.cs
- HostProtectionException.cs
- RecommendedAsConfigurableAttribute.cs
- ObjectToModelValueConverter.cs
- HtmlWindowCollection.cs
- CompilerError.cs
- FrameworkContextData.cs
- RuntimeConfig.cs
- InteropEnvironment.cs
- CustomAttributeBuilder.cs
- DbBuffer.cs
- ConsoleCancelEventArgs.cs
- SchemaManager.cs
- PopupEventArgs.cs
- Encoding.cs
- DataTableMapping.cs
- MappingSource.cs
- SqlClientWrapperSmiStream.cs
- ButtonBase.cs
- SoapSchemaImporter.cs
- XmlSchemaAnnotation.cs
- DynamicMethod.cs
- CodeSnippetTypeMember.cs
- NextPreviousPagerField.cs
- SnapshotChangeTrackingStrategy.cs
- BookmarkScopeInfo.cs
- BuildDependencySet.cs
- NullRuntimeConfig.cs
- XsltSettings.cs
- CodeIdentifier.cs
- SystemIPv4InterfaceProperties.cs
- Parser.cs
- EntityDataSourceContextDisposingEventArgs.cs
- Mouse.cs
- MetabaseServerConfig.cs
- DefaultPropertyAttribute.cs
- IisTraceWebEventProvider.cs
- PanningMessageFilter.cs
- StrongTypingException.cs
- ScriptReferenceBase.cs
- HtmlElementCollection.cs
- DomainConstraint.cs
- UIElementPropertyUndoUnit.cs
- dtdvalidator.cs
- SizeLimitedCache.cs
- sqlcontext.cs
- TraceUtility.cs
- FilterException.cs
- OptimizedTemplateContent.cs
- MultiByteCodec.cs
- ItemsChangedEventArgs.cs
- LogicalTreeHelper.cs
- SystemWebSectionGroup.cs
- RawStylusInputCustomData.cs
- ToolZone.cs
- ActivityWithResultWrapper.cs
- DefinitionBase.cs
- XsltCompileContext.cs
- EncodingDataItem.cs
- RoleService.cs
- CompositeKey.cs
- FacetDescription.cs
- RadioButton.cs
- DockPanel.cs
- FieldTemplateUserControl.cs
- GeometryGroup.cs
- SrgsNameValueTag.cs
- XmlReader.cs
- DeploymentSection.cs
- GridView.cs
- AgileSafeNativeMemoryHandle.cs
- AnimationStorage.cs
- PropertyEmitterBase.cs
- SqlDataAdapter.cs