Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- TableAutomationPeer.cs
- CurrencyWrapper.cs
- ColumnTypeConverter.cs
- ProfilePropertySettingsCollection.cs
- SequenceFullException.cs
- TextSchema.cs
- QueryExecutionOption.cs
- Group.cs
- TreeNodeConverter.cs
- MdiWindowListItemConverter.cs
- FixedFlowMap.cs
- CommandLibraryHelper.cs
- CurrentChangedEventManager.cs
- Margins.cs
- TreeBuilderXamlTranslator.cs
- FormDocumentDesigner.cs
- NavigationWindow.cs
- PropertyDescriptor.cs
- PowerStatus.cs
- XmlQualifiedName.cs
- PackWebRequest.cs
- InstanceDataCollectionCollection.cs
- LogLogRecordEnumerator.cs
- SqlCacheDependencyDatabaseCollection.cs
- StreamResourceInfo.cs
- SpellerStatusTable.cs
- PassportIdentity.cs
- Model3D.cs
- basemetadatamappingvisitor.cs
- Transform3D.cs
- SHA512Managed.cs
- SecureUICommand.cs
- unsafenativemethodsother.cs
- TemplateControlBuildProvider.cs
- Geometry.cs
- SatelliteContractVersionAttribute.cs
- SessionIDManager.cs
- TaiwanCalendar.cs
- OrderByBuilder.cs
- Stroke2.cs
- SecurityTokenTypes.cs
- UInt32.cs
- DuplicateWaitObjectException.cs
- SamlAttributeStatement.cs
- ClaimSet.cs
- XmlSchemaRedefine.cs
- WebBrowserEvent.cs
- CLSCompliantAttribute.cs
- DataBoundControlAdapter.cs
- ContextMenuService.cs
- ObjectSet.cs
- Process.cs
- ExceptionAggregator.cs
- LineServicesRun.cs
- EmptyImpersonationContext.cs
- MarshalDirectiveException.cs
- Wizard.cs
- AxHost.cs
- ListBox.cs
- DocumentViewerHelper.cs
- AvTrace.cs
- ScrollData.cs
- EntityDataSourceEntityTypeFilterItem.cs
- AsyncOperationManager.cs
- Color.cs
- StringKeyFrameCollection.cs
- PrintPreviewGraphics.cs
- mediaeventargs.cs
- CryptoHelper.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- WindowsGraphicsCacheManager.cs
- BrowserCapabilitiesFactory.cs
- Attributes.cs
- Clause.cs
- TextDecoration.cs
- SqlEnums.cs
- ValidationRule.cs
- BeginCreateSecurityTokenRequest.cs
- SoapInteropTypes.cs
- ComplexBindingPropertiesAttribute.cs
- CompoundFileReference.cs
- PathData.cs
- ComponentResourceKeyConverter.cs
- BezierSegment.cs
- mediaeventargs.cs
- WindowsIdentity.cs
- UserControl.cs
- MethodImplAttribute.cs
- OneToOneMappingSerializer.cs
- CurrencyWrapper.cs
- UIAgentInitializationException.cs
- SQLRoleProvider.cs
- SrgsElement.cs
- ToolStripLocationCancelEventArgs.cs
- ProgressBarRenderer.cs
- NavigationWindow.cs
- GridPatternIdentifiers.cs
- WmlValidatorAdapter.cs
- MappingModelBuildProvider.cs
- MenuItemCollection.cs