Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Sockets / IPPacketInformation.cs / 1305376 / 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
- CompiledELinqQueryState.cs
- SafeMemoryMappedViewHandle.cs
- PopupRootAutomationPeer.cs
- MSAAEventDispatcher.cs
- LineSegment.cs
- FocusChangedEventArgs.cs
- TransactedBatchingBehavior.cs
- WebSysDisplayNameAttribute.cs
- DataControlImageButton.cs
- TextParagraphView.cs
- ContentType.cs
- wmiprovider.cs
- DataFieldConverter.cs
- AvTraceFormat.cs
- CodeStatementCollection.cs
- HashCodeCombiner.cs
- LayoutEditorPart.cs
- TemporaryBitmapFile.cs
- BinaryParser.cs
- XmlExtensionFunction.cs
- DataSetMappper.cs
- HtmlHead.cs
- OdbcUtils.cs
- JoinElimination.cs
- ActiveXSite.cs
- SerializableAuthorizationContext.cs
- ResourceContainer.cs
- DecoderExceptionFallback.cs
- JsonFormatWriterGenerator.cs
- TraceLevelStore.cs
- _AutoWebProxyScriptHelper.cs
- NumberAction.cs
- StrongNameIdentityPermission.cs
- XmlUrlResolver.cs
- VirtualPath.cs
- ListView.cs
- XmlSchemaInclude.cs
- XmlSchemaGroupRef.cs
- ServiceErrorHandler.cs
- ToolStripDropDown.cs
- _NegoStream.cs
- WebBrowserHelper.cs
- FirstMatchCodeGroup.cs
- DelimitedListTraceListener.cs
- ParseElementCollection.cs
- DispatcherFrame.cs
- Canvas.cs
- PassportPrincipal.cs
- IgnoreDeviceFilterElementCollection.cs
- _Rfc2616CacheValidators.cs
- ComponentChangingEvent.cs
- CollectionViewProxy.cs
- Matrix3DValueSerializer.cs
- ProtocolsConfigurationHandler.cs
- MimeMultiPart.cs
- SqlOuterApplyReducer.cs
- TextEditorMouse.cs
- CheckBoxAutomationPeer.cs
- SchemaElementDecl.cs
- FormClosingEvent.cs
- OrderedParallelQuery.cs
- DoubleLinkListEnumerator.cs
- SymbolEqualComparer.cs
- BitmapFrameEncode.cs
- PeerNameRecordCollection.cs
- XmlSerializerSection.cs
- Model3DGroup.cs
- Transform3DCollection.cs
- ToolStripItem.cs
- RegionData.cs
- HostProtectionPermission.cs
- Parsers.cs
- OleDbConnection.cs
- storepermissionattribute.cs
- LinqDataSourceDisposeEventArgs.cs
- DnsPermission.cs
- ShadowGlyph.cs
- DataGridViewRowConverter.cs
- TrustManager.cs
- QilLoop.cs
- BrushValueSerializer.cs
- prefixendpointaddressmessagefiltertable.cs
- Brush.cs
- SourceSwitch.cs
- IChannel.cs
- FormsAuthenticationCredentials.cs
- FileChangesMonitor.cs
- IPHostEntry.cs
- Dynamic.cs
- ApplicationBuildProvider.cs
- CheckBoxStandardAdapter.cs
- SoapUnknownHeader.cs
- WebContentFormatHelper.cs
- CompilerHelpers.cs
- ConsumerConnectionPoint.cs
- TableStyle.cs
- MD5.cs
- DBPropSet.cs
- SqlCrossApplyToCrossJoin.cs
- WsdlExporter.cs