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
- FrameworkPropertyMetadata.cs
- EventItfInfo.cs
- KeyValuePair.cs
- DataGridColumnHeader.cs
- ExpressionNode.cs
- ImportCatalogPart.cs
- ActiveXSite.cs
- ControlBindingsCollection.cs
- UserMapPath.cs
- VectorValueSerializer.cs
- ConfigurationLockCollection.cs
- MainMenu.cs
- SecurityKeyUsage.cs
- CalculatedColumn.cs
- QueryableDataSourceEditData.cs
- ScopedKnownTypes.cs
- RowVisual.cs
- MailAddressCollection.cs
- RelatedView.cs
- DoubleCollectionConverter.cs
- DataKeyArray.cs
- RtfNavigator.cs
- RtfFormatStack.cs
- ResourceManager.cs
- DataGridBeginningEditEventArgs.cs
- WebPartConnectionCollection.cs
- HijriCalendar.cs
- CompressEmulationStream.cs
- FocusWithinProperty.cs
- TypeBuilder.cs
- XmlDataFileEditor.cs
- WmpBitmapEncoder.cs
- RenderOptions.cs
- SmiTypedGetterSetter.cs
- Propagator.Evaluator.cs
- _AutoWebProxyScriptWrapper.cs
- BuildProvider.cs
- ReturnType.cs
- ChannelTraceRecord.cs
- DesignerSelectionListAdapter.cs
- SchemaImporter.cs
- ExternalException.cs
- RegistryPermission.cs
- DriveNotFoundException.cs
- HeaderUtility.cs
- Blend.cs
- ObjectDataSourceStatusEventArgs.cs
- ActivatedMessageQueue.cs
- RoutedEvent.cs
- PackageFilter.cs
- HwndKeyboardInputProvider.cs
- MouseActionValueSerializer.cs
- StructuralType.cs
- AlternateView.cs
- UserControlCodeDomTreeGenerator.cs
- EncoderBestFitFallback.cs
- DataReceivedEventArgs.cs
- DrawingCollection.cs
- DataKeyCollection.cs
- AssemblyNameProxy.cs
- AuthenticationSection.cs
- FontInfo.cs
- DataBoundControlHelper.cs
- SizeAnimation.cs
- UnknownBitmapDecoder.cs
- _Connection.cs
- LinqDataSourceValidationException.cs
- OleDbConnection.cs
- HashHelper.cs
- SynchronizedKeyedCollection.cs
- CollectionChange.cs
- Privilege.cs
- RC2CryptoServiceProvider.cs
- PeerObject.cs
- XmlElementList.cs
- PartialTrustVisibleAssembliesSection.cs
- ListBoxItem.cs
- WriteFileContext.cs
- SatelliteContractVersionAttribute.cs
- TCPListener.cs
- InternalConfigHost.cs
- ProcessHostMapPath.cs
- GroupQuery.cs
- NumericUpDown.cs
- XamlBuildTaskServices.cs
- ExternalFile.cs
- Sorting.cs
- TemplatedWizardStep.cs
- PagesChangedEventArgs.cs
- DSACryptoServiceProvider.cs
- MembershipValidatePasswordEventArgs.cs
- UnsafeNativeMethodsTablet.cs
- __ConsoleStream.cs
- ExecutionScope.cs
- TextTreeExtractElementUndoUnit.cs
- _CookieModule.cs
- InvokeMethodActivityDesigner.cs
- RestHandlerFactory.cs
- GridViewItemAutomationPeer.cs
- RichTextBox.cs