Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / IPeerNeighbor.cs / 1 / IPeerNeighbor.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.ObjectModel; using System.ServiceModel; // Neighbor interface interface IPeerNeighbor : IExtensibleObject{ bool IsConnected { get; } // True if the neighbor is connected PeerNodeAddress ListenAddress { get; set; } // Neighbor's listen address bool IsInitiator { get; } ulong NodeId { get; set; } // NodeID of the neighboring node PeerNeighborState State { get; set; } bool IsClosing { get; } IAsyncResult BeginSend(Message message, AsyncCallback callback, object state); IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, object state); void EndSend(IAsyncResult result); void Send(Message message); bool TrySetState(PeerNeighborState state); void Abort(PeerCloseReason reason, PeerCloseInitiator initiator); Message RequestSecurityToken(Message request); void Ping(Message request); UtilityExtension Utility{get;} } // Neighbor states // If add new states, carefully consider where they should occur in state transition and make // appropriate changes to PeerNeighbor implementation. enum PeerNeighborState { Created, Opened, Authenticated, Connecting, Connected, Disconnecting, Disconnected, Faulted, Closed, } static class PeerNeighborStateHelper { // Returns true if the specified state can be set for the neighbor public static bool IsSettable(PeerNeighborState state) { return ( (state == PeerNeighborState.Authenticated) || (state == PeerNeighborState.Connecting) || (state == PeerNeighborState.Connected) || (state == PeerNeighborState.Disconnecting) || (state == PeerNeighborState.Disconnected)); } // Returns true if the specified state is a "connected" state public static bool IsConnected(PeerNeighborState state) { return ((state == PeerNeighborState.Connected)); } // Returns true if the specified state is either authenticated or closing public static bool IsAuthenticatedOrClosed(PeerNeighborState state) { return ( (state == PeerNeighborState.Authenticated) || (state == PeerNeighborState.Faulted) || (state == PeerNeighborState.Closed)); } } } // 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
- TextBox.cs
- SplitterPanel.cs
- ResXResourceWriter.cs
- QueryCacheManager.cs
- DataGridItemEventArgs.cs
- PagedDataSource.cs
- Soap12ProtocolImporter.cs
- StringCollection.cs
- LongCountAggregationOperator.cs
- InlineUIContainer.cs
- DetailsViewUpdateEventArgs.cs
- dsa.cs
- PageAsyncTaskManager.cs
- LambdaCompiler.ControlFlow.cs
- SystemIPv6InterfaceProperties.cs
- SoapElementAttribute.cs
- TrustManager.cs
- DataControlImageButton.cs
- ServerValidateEventArgs.cs
- MruCache.cs
- Accessible.cs
- Function.cs
- HttpDateParse.cs
- AuthenticationService.cs
- CombinedGeometry.cs
- XmlQueryStaticData.cs
- ActivityCodeDomSerializer.cs
- ToolboxItemImageConverter.cs
- TypeHelper.cs
- IPipelineRuntime.cs
- ProvideValueServiceProvider.cs
- TextDecorationLocationValidation.cs
- FlowDocumentReaderAutomationPeer.cs
- DSASignatureFormatter.cs
- FactoryGenerator.cs
- ParameterBuilder.cs
- RecordBuilder.cs
- GCHandleCookieTable.cs
- HttpWebResponse.cs
- XmlSchemaObject.cs
- AsyncOperationManager.cs
- ProjectedSlot.cs
- ModelUIElement3D.cs
- JsonByteArrayDataContract.cs
- IApplicationTrustManager.cs
- PresentationAppDomainManager.cs
- ExtentKey.cs
- PluralizationService.cs
- XmlComment.cs
- SuspendDesigner.cs
- StyleXamlParser.cs
- categoryentry.cs
- SharedMemory.cs
- EventWaitHandle.cs
- TextInfo.cs
- XamlPointCollectionSerializer.cs
- ReferenceService.cs
- XmlWhitespace.cs
- DataGridTextBox.cs
- CriticalFileToken.cs
- GAC.cs
- PartitionedStreamMerger.cs
- FormsAuthenticationTicket.cs
- FileAuthorizationModule.cs
- EmptyEnumerator.cs
- DebugHandleTracker.cs
- EnvironmentPermission.cs
- InvalidContentTypeException.cs
- DataBoundLiteralControl.cs
- WebPartVerb.cs
- ImageField.cs
- RtfFormatStack.cs
- StructuredTypeInfo.cs
- ScrollableControl.cs
- AuthorizationRuleCollection.cs
- MessageQueuePermissionAttribute.cs
- ExpressionDumper.cs
- WebHttpDispatchOperationSelectorData.cs
- ConnectionPoint.cs
- IdnElement.cs
- XmlSchemaSubstitutionGroup.cs
- XmlSchemaValidator.cs
- ComEventsSink.cs
- EventLogger.cs
- DPAPIProtectedConfigurationProvider.cs
- InvokePatternIdentifiers.cs
- Control.cs
- ValidatingReaderNodeData.cs
- ObjectManager.cs
- ContextMenu.cs
- TokenFactoryFactory.cs
- XmlSchemaSimpleTypeRestriction.cs
- filewebrequest.cs
- SqlProcedureAttribute.cs
- RubberbandSelector.cs
- ColumnProvider.cs
- SqlHelper.cs
- DisplayInformation.cs
- HtmlForm.cs
- RelationshipEnd.cs