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
- InlineUIContainer.cs
- PtsContext.cs
- FontNamesConverter.cs
- Clock.cs
- RoleManagerModule.cs
- XmlDocumentSurrogate.cs
- AuthenticationService.cs
- UrlPath.cs
- WebPartTransformer.cs
- ContentTextAutomationPeer.cs
- followingsibling.cs
- ClientTargetCollection.cs
- FrugalMap.cs
- AttributeProviderAttribute.cs
- EditorBrowsableAttribute.cs
- TreeNodeSelectionProcessor.cs
- ActivityExecutionContextCollection.cs
- NavigationPropertyEmitter.cs
- ToolboxItemSnapLineBehavior.cs
- WorkflowMarkupSerializerMapping.cs
- CompositeFontFamily.cs
- DivideByZeroException.cs
- ViewManager.cs
- DeviceContext2.cs
- SystemIPGlobalStatistics.cs
- UnionExpr.cs
- SmiEventSink_Default.cs
- TextContainerChangedEventArgs.cs
- HashHelper.cs
- AggregateException.cs
- Splitter.cs
- XmlSchemaElement.cs
- TriggerCollection.cs
- TransactionContextManager.cs
- LineGeometry.cs
- WindowsGraphics2.cs
- ClonableStack.cs
- OAVariantLib.cs
- Object.cs
- WeakReferenceEnumerator.cs
- IgnoreFileBuildProvider.cs
- SoapObjectReader.cs
- AspCompat.cs
- DBSqlParserColumn.cs
- UserControlParser.cs
- WindowsAuthenticationModule.cs
- PopupControlService.cs
- RIPEMD160Managed.cs
- Metafile.cs
- OdbcError.cs
- backend.cs
- QueueProcessor.cs
- ServiceNotStartedException.cs
- InkCanvasFeedbackAdorner.cs
- IisTraceListener.cs
- InstanceDescriptor.cs
- ScriptModule.cs
- MultiAsyncResult.cs
- mediaeventshelper.cs
- cookieexception.cs
- ObjectQueryState.cs
- CellIdBoolean.cs
- ImmutablePropertyDescriptorGridEntry.cs
- DataGridViewColumnTypePicker.cs
- RtType.cs
- DynamicValueConverter.cs
- SessionStateModule.cs
- FontDifferentiator.cs
- CustomCategoryAttribute.cs
- InkCollectionBehavior.cs
- SspiSafeHandles.cs
- WebConfigurationHostFileChange.cs
- XmlConverter.cs
- AppDomainFactory.cs
- Rectangle.cs
- DbProviderConfigurationHandler.cs
- DateTimeEditor.cs
- DBSchemaRow.cs
- SqlUnionizer.cs
- TcpStreams.cs
- BinaryConverter.cs
- StaticTextPointer.cs
- CompressionTracing.cs
- DataGridViewLinkColumn.cs
- WaitForChangedResult.cs
- VisualStyleElement.cs
- UnauthorizedAccessException.cs
- DecimalStorage.cs
- ErrorTolerantObjectWriter.cs
- OdbcConnection.cs
- SafeTimerHandle.cs
- HotCommands.cs
- CompiledQueryCacheEntry.cs
- CompressStream.cs
- EntitySqlQueryState.cs
- ScriptControlDescriptor.cs
- FileDataSourceCache.cs
- OrderedDictionary.cs
- ApplicationDirectoryMembershipCondition.cs
- BindingContext.cs