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
- XmlDigitalSignatureProcessor.cs
- PartBasedPackageProperties.cs
- WebPartsPersonalizationAuthorization.cs
- NullableDecimalMinMaxAggregationOperator.cs
- InvalidDataException.cs
- FunctionQuery.cs
- CellConstantDomain.cs
- BaseHashHelper.cs
- MenuBase.cs
- ApplicationServicesHostFactory.cs
- ToolboxComponentsCreatedEventArgs.cs
- StorageRoot.cs
- ScriptDescriptor.cs
- ConcurrentBag.cs
- _Events.cs
- XmlSchema.cs
- DocumentXmlWriter.cs
- TextSegment.cs
- WsdlInspector.cs
- CultureInfoConverter.cs
- COM2ICategorizePropertiesHandler.cs
- HatchBrush.cs
- DataGridViewColumnStateChangedEventArgs.cs
- PathParser.cs
- WebPartHeaderCloseVerb.cs
- SingleSelectRootGridEntry.cs
- Processor.cs
- SmiMetaData.cs
- TextParaLineResult.cs
- NamedPipeAppDomainProtocolHandler.cs
- DBSqlParserTable.cs
- SecurityTokenAuthenticator.cs
- RbTree.cs
- SetIndexBinder.cs
- SQLByte.cs
- MessageQueue.cs
- BrushValueSerializer.cs
- ImportOptions.cs
- SqlTypesSchemaImporter.cs
- CqlParser.cs
- CssTextWriter.cs
- DataRowCollection.cs
- ReadWriteSpinLock.cs
- Rectangle.cs
- EntityCommandDefinition.cs
- NameValueSectionHandler.cs
- FreeFormDesigner.cs
- PopupRoot.cs
- WindowsTitleBar.cs
- TPLETWProvider.cs
- FormViewDesigner.cs
- DataGridViewRowPostPaintEventArgs.cs
- PortCache.cs
- ElementsClipboardData.cs
- HandledEventArgs.cs
- TableCell.cs
- PartialClassGenerationTask.cs
- HtmlEncodedRawTextWriter.cs
- documentsequencetextcontainer.cs
- CodeMemberEvent.cs
- RenderingEventArgs.cs
- XmlDocumentSurrogate.cs
- CachedResourceDictionaryExtension.cs
- RequestQueryParser.cs
- ClientSideProviderDescription.cs
- DecoderExceptionFallback.cs
- AmbiguousMatchException.cs
- ACL.cs
- DataViewManager.cs
- AutomationPropertyInfo.cs
- Wizard.cs
- ColumnHeaderConverter.cs
- cookieexception.cs
- HttpRequest.cs
- ResourceManager.cs
- TableRowCollection.cs
- PersonalizablePropertyEntry.cs
- SpellerError.cs
- SchemaComplexType.cs
- RsaSecurityTokenAuthenticator.cs
- Storyboard.cs
- _LazyAsyncResult.cs
- SplashScreen.cs
- NotFiniteNumberException.cs
- StateItem.cs
- WindowsAuthenticationEventArgs.cs
- AttributeUsageAttribute.cs
- BinHexEncoding.cs
- PriorityBindingExpression.cs
- CompModSwitches.cs
- IArgumentProvider.cs
- FixedSOMTextRun.cs
- SqlClientPermission.cs
- ComMethodElement.cs
- SymmetricKeyWrap.cs
- QueryGenerator.cs
- UserMapPath.cs
- IIS7WorkerRequest.cs
- SvcMapFileSerializer.cs
- ApplicationDirectory.cs