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
- StreamGeometry.cs
- DateTimeUtil.cs
- KeyValueSerializer.cs
- ApplicationCommands.cs
- entityreference_tresulttype.cs
- SQLBytes.cs
- AlphabeticalEnumConverter.cs
- ObjectReferenceStack.cs
- DependencyPropertyConverter.cs
- XmlWrappingReader.cs
- IdnMapping.cs
- SevenBitStream.cs
- LogEntryHeaderDeserializer.cs
- odbcmetadatafactory.cs
- DataGridPagerStyle.cs
- LinearGradientBrush.cs
- CodeIdentifier.cs
- XsltQilFactory.cs
- EntityContainer.cs
- ResourcePermissionBaseEntry.cs
- XmlSerializableReader.cs
- ItemList.cs
- CodeDelegateInvokeExpression.cs
- ISFTagAndGuidCache.cs
- NCryptNative.cs
- ProfileSection.cs
- ListMarkerLine.cs
- DataGridToolTip.cs
- DataGridViewElement.cs
- CompilationRelaxations.cs
- AssemblyResolver.cs
- DesignDataSource.cs
- ErrorFormatter.cs
- ReachUIElementCollectionSerializerAsync.cs
- _NegotiateClient.cs
- StringInfo.cs
- TypeValidationEventArgs.cs
- Wizard.cs
- ObjectView.cs
- SelectionItemProviderWrapper.cs
- GroupItem.cs
- SqlGenericUtil.cs
- ViewPort3D.cs
- ExpressionDumper.cs
- TableCellAutomationPeer.cs
- RegexCaptureCollection.cs
- XmlNotation.cs
- SqlEnums.cs
- GenericXmlSecurityToken.cs
- XmlBaseReader.cs
- DeferredReference.cs
- TextEditorCharacters.cs
- BaseTemplateParser.cs
- DescendentsWalker.cs
- Divide.cs
- VerbConverter.cs
- UnmanagedMemoryStreamWrapper.cs
- RemotingException.cs
- ReceiveContext.cs
- UIElement.cs
- TabControlEvent.cs
- SubMenuStyleCollection.cs
- Menu.cs
- IgnorePropertiesAttribute.cs
- AngleUtil.cs
- DataGridViewSelectedColumnCollection.cs
- ToolStripGripRenderEventArgs.cs
- WriteableBitmap.cs
- AuthenticateEventArgs.cs
- DocumentOutline.cs
- DataGridColumnHeadersPresenter.cs
- StaticFileHandler.cs
- JsonReader.cs
- XamlSerializerUtil.cs
- MenuItem.cs
- OrderByBuilder.cs
- WindowsAltTab.cs
- ManagementClass.cs
- ServiceDeploymentInfo.cs
- Control.cs
- WebPartZoneBase.cs
- CodeDelegateCreateExpression.cs
- StringDictionaryCodeDomSerializer.cs
- EventSchemaTraceListener.cs
- CorrelationResolver.cs
- ConfigXmlDocument.cs
- IdnElement.cs
- StretchValidation.cs
- BypassElementCollection.cs
- Manipulation.cs
- ClientScriptManager.cs
- DefaultMemberAttribute.cs
- AxParameterData.cs
- XmlILIndex.cs
- CriticalHandle.cs
- InlineUIContainer.cs
- SpecularMaterial.cs
- UserControlParser.cs
- UIElementCollection.cs
- RuntimeCompatibilityAttribute.cs