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
- TypeGeneratedEventArgs.cs
- XmlCharType.cs
- NetStream.cs
- HtmlFormParameterReader.cs
- BuildManagerHost.cs
- SupportingTokenParameters.cs
- ComponentRenameEvent.cs
- DrawingGroup.cs
- TypeConverterAttribute.cs
- PropertyTab.cs
- RenamedEventArgs.cs
- CodeGroup.cs
- initElementDictionary.cs
- ActivityBindForm.Designer.cs
- validation.cs
- AdapterDictionary.cs
- NamespaceQuery.cs
- DragCompletedEventArgs.cs
- XmlByteStreamWriter.cs
- ProfileEventArgs.cs
- TemplateColumn.cs
- SystemPens.cs
- MasterPageParser.cs
- StaticResourceExtension.cs
- Statements.cs
- WindowsHyperlink.cs
- GenericUriParser.cs
- ActiveXSite.cs
- CipherData.cs
- SoapDocumentServiceAttribute.cs
- MetadataCache.cs
- SmtpNtlmAuthenticationModule.cs
- XamlSerializationHelper.cs
- NameValueSectionHandler.cs
- EFDataModelProvider.cs
- TreeViewItem.cs
- DataGridItem.cs
- DataGridCell.cs
- SQLDouble.cs
- AutomationPropertyInfo.cs
- ExtentCqlBlock.cs
- Italic.cs
- InputBindingCollection.cs
- IIS7WorkerRequest.cs
- CompiledRegexRunnerFactory.cs
- nulltextcontainer.cs
- BitmapMetadataEnumerator.cs
- HttpListenerPrefixCollection.cs
- ProfileGroupSettings.cs
- FlowDocument.cs
- BridgeDataRecord.cs
- IsolationInterop.cs
- ScrollBar.cs
- ApplicationFileCodeDomTreeGenerator.cs
- FixedSOMPageElement.cs
- TypedReference.cs
- StructuredTypeEmitter.cs
- ValidationErrorInfo.cs
- SafeNativeMethods.cs
- MissingMemberException.cs
- ExceptionRoutedEventArgs.cs
- DNS.cs
- StyleXamlTreeBuilder.cs
- InputGestureCollection.cs
- _BufferOffsetSize.cs
- SmiSettersStream.cs
- ElementUtil.cs
- DelegatingTypeDescriptionProvider.cs
- UnsafeNativeMethodsMilCoreApi.cs
- CfgSemanticTag.cs
- TableLayoutColumnStyleCollection.cs
- SqlServices.cs
- WindowPattern.cs
- BufferedStream.cs
- CharacterMetrics.cs
- DesignTimeTemplateParser.cs
- ItemCollection.cs
- XmlStringTable.cs
- JsonServiceDocumentSerializer.cs
- XamlParser.cs
- IdleTimeoutMonitor.cs
- XmlQualifiedNameTest.cs
- MatrixIndependentAnimationStorage.cs
- DbCommandTree.cs
- KeyedCollection.cs
- DBNull.cs
- ProfileManager.cs
- DictionaryManager.cs
- SQLBinaryStorage.cs
- ListChangedEventArgs.cs
- LinkDescriptor.cs
- PageTheme.cs
- Tracking.cs
- httpserverutility.cs
- SoapEnumAttribute.cs
- util.cs
- SessionStateContainer.cs
- mansign.cs
- CustomAttributeFormatException.cs
- NonNullItemCollection.cs