Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / Sockets / IPPacketInformation.cs / 1 / IPPacketInformation.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; public struct IPPacketInformation { IPAddress address; int networkInterface; internal IPPacketInformation(IPAddress address, int networkInterface){ this.address = address; this.networkInterface = networkInterface; } public IPAddress Address { get{ return address; } } public int Interface { get{ return networkInterface; } } public static bool operator == (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return packetInformation1.Equals(packetInformation2); } public static bool operator != (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return !packetInformation1.Equals(packetInformation2); } public override bool Equals(object comparand) { if ((object) comparand == null) { return false; } if (!(comparand is IPPacketInformation)) return false; IPPacketInformation obj = (IPPacketInformation) comparand; if (address.Equals(obj.address) && networkInterface == obj.networkInterface) return (true); return false; } public override int GetHashCode() { return address.GetHashCode() + networkInterface.GetHashCode(); } }; // enum SocketFlags } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Sockets { using System.Net; public struct IPPacketInformation { IPAddress address; int networkInterface; internal IPPacketInformation(IPAddress address, int networkInterface){ this.address = address; this.networkInterface = networkInterface; } public IPAddress Address { get{ return address; } } public int Interface { get{ return networkInterface; } } public static bool operator == (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return packetInformation1.Equals(packetInformation2); } public static bool operator != (IPPacketInformation packetInformation1, IPPacketInformation packetInformation2 ) { return !packetInformation1.Equals(packetInformation2); } public override bool Equals(object comparand) { if ((object) comparand == null) { return false; } if (!(comparand is IPPacketInformation)) return false; IPPacketInformation obj = (IPPacketInformation) comparand; if (address.Equals(obj.address) && networkInterface == obj.networkInterface) return (true); return false; } public override int GetHashCode() { return address.GetHashCode() + networkInterface.GetHashCode(); } }; // enum SocketFlags } // 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
- TypeHelper.cs
- CorrelationValidator.cs
- TableRow.cs
- TableHeaderCell.cs
- _Events.cs
- Thumb.cs
- PersonalizationAdministration.cs
- VirtualDirectoryMappingCollection.cs
- Brush.cs
- LoginAutoFormat.cs
- PopupRoot.cs
- DecoderReplacementFallback.cs
- DateTime.cs
- HttpClientChannel.cs
- SatelliteContractVersionAttribute.cs
- ColorAnimation.cs
- SqlHelper.cs
- LoadMessageLogger.cs
- AddressHeader.cs
- Margins.cs
- TabletCollection.cs
- SimpleHandlerFactory.cs
- FactoryGenerator.cs
- OutgoingWebResponseContext.cs
- TextControlDesigner.cs
- ProcessModuleDesigner.cs
- SocketAddress.cs
- UserControlBuildProvider.cs
- OrderPreservingMergeHelper.cs
- InfoCardClaim.cs
- AnonymousIdentificationSection.cs
- TypeCodeDomSerializer.cs
- SelectingProviderEventArgs.cs
- SyntaxCheck.cs
- GroupBoxAutomationPeer.cs
- graph.cs
- InkCollectionBehavior.cs
- RuntimeEnvironment.cs
- InkCanvas.cs
- TitleStyle.cs
- SupportingTokenBindingElement.cs
- SamlAuthorizationDecisionStatement.cs
- TaskDesigner.cs
- ItemsPanelTemplate.cs
- _SingleItemRequestCache.cs
- XmlValidatingReaderImpl.cs
- PropertyGeneratedEventArgs.cs
- SingleConverter.cs
- CryptographicAttribute.cs
- arc.cs
- SendingRequestEventArgs.cs
- XmlHierarchicalEnumerable.cs
- __TransparentProxy.cs
- ExpressionPrefixAttribute.cs
- ApplicationContext.cs
- PassportAuthentication.cs
- EntityDataSourceMemberPath.cs
- UserControlAutomationPeer.cs
- GatewayIPAddressInformationCollection.cs
- DataGridViewCellConverter.cs
- RelatedImageListAttribute.cs
- CompiledRegexRunnerFactory.cs
- ValidatorCompatibilityHelper.cs
- StylusTip.cs
- TypeConverterHelper.cs
- SqlUDTStorage.cs
- srgsitem.cs
- MasterPageBuildProvider.cs
- URLIdentityPermission.cs
- LabelExpression.cs
- TransformerInfo.cs
- ToolStripScrollButton.cs
- xdrvalidator.cs
- ThumbAutomationPeer.cs
- WeakKeyDictionary.cs
- DataChangedEventManager.cs
- NestedContainer.cs
- ProfileSettingsCollection.cs
- DesignRelation.cs
- QilStrConcatenator.cs
- DeadCharTextComposition.cs
- MinimizableAttributeTypeConverter.cs
- DrawingState.cs
- SimpleBitVector32.cs
- VolatileEnlistmentMultiplexing.cs
- ApplicationHost.cs
- WindowsHyperlink.cs
- ProfileEventArgs.cs
- XhtmlBasicLinkAdapter.cs
- HostedNamedPipeTransportManager.cs
- WebConfigurationFileMap.cs
- ArraySet.cs
- GridViewSelectEventArgs.cs
- WebPartConnectionsCancelEventArgs.cs
- XmlObjectSerializerReadContextComplexJson.cs
- XmlSerializationWriter.cs
- BaseWebProxyFinder.cs
- HttpCapabilitiesSectionHandler.cs
- SessionIDManager.cs
- ExecutionScope.cs