Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Discovery / System / ServiceModel / Channels / UdpMessageProperty.cs / 1305376 / UdpMessageProperty.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Runtime; using System.ServiceModel.Discovery; class UdpMessageProperty : IMessageProperty { const string PropertyName = "UdpMessageProperty"; public UdpMessageProperty(int interfaceIndex) { this.InterfaceIndex = interfaceIndex; } UdpMessageProperty(UdpMessageProperty other) { this.InterfaceIndex = other.InterfaceIndex; } public static string Name { get { return PropertyName; } } public int InterfaceIndex { get; private set; } public static bool TryGet(Message message, out UdpMessageProperty property) { if (message == null) { throw FxTrace.Exception.ArgumentNull("message"); } return TryGet(message.Properties, out property); } public static bool TryGet(MessageProperties properties, out UdpMessageProperty property) { if (properties == null) { throw FxTrace.Exception.ArgumentNull("properties"); } object value = null; if (properties.TryGetValue(PropertyName, out value)) { property = value as UdpMessageProperty; } else { property = null; } return property != null; } public void AddTo(Message message) { if (message == null) { throw FxTrace.Exception.ArgumentNull("message"); } AddTo(message.Properties); } public void AddTo(MessageProperties properties) { if (properties == null) { throw FxTrace.Exception.ArgumentNull("properties"); } properties.Add(UdpMessageProperty.Name, this); } public IMessageProperty CreateCopy() { return new UdpMessageProperty(this); } } } // 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
- ExpandCollapseIsCheckedConverter.cs
- RadioButtonPopupAdapter.cs
- mediaclock.cs
- _NestedSingleAsyncResult.cs
- StylusPlugInCollection.cs
- DbSetClause.cs
- VisualStateChangedEventArgs.cs
- PagePropertiesChangingEventArgs.cs
- ServiceDescriptionImporter.cs
- BamlBinaryReader.cs
- PageCache.cs
- ServicesUtilities.cs
- ConfigurationManagerInternal.cs
- StatusBarDrawItemEvent.cs
- BezierSegment.cs
- CellQuery.cs
- QueryCursorEventArgs.cs
- HMAC.cs
- SystemTcpConnection.cs
- PackagePartCollection.cs
- ArcSegment.cs
- AsyncResult.cs
- Token.cs
- StylusCaptureWithinProperty.cs
- SpeechAudioFormatInfo.cs
- SecurityPermission.cs
- PreviewPrintController.cs
- ExpressionBuilder.cs
- RadioButtonPopupAdapter.cs
- DeploymentSection.cs
- WebPartConnectionsConfigureVerb.cs
- DSASignatureDeformatter.cs
- CodeGeneratorOptions.cs
- WsdlImporter.cs
- SessionStateItemCollection.cs
- AppendHelper.cs
- SecurityRuntime.cs
- DataGridAddNewRow.cs
- BamlBinaryWriter.cs
- Int32CAMarshaler.cs
- Int16Converter.cs
- SingleKeyFrameCollection.cs
- DataSourceNameHandler.cs
- DiagnosticTrace.cs
- ParallelTimeline.cs
- UnsafeNativeMethods.cs
- FontStretch.cs
- CopyNodeSetAction.cs
- ExternalCalls.cs
- DataGridViewSelectedCellCollection.cs
- PackageRelationship.cs
- ToolStripSeparatorRenderEventArgs.cs
- cookiecollection.cs
- DLinqColumnProvider.cs
- Rotation3DAnimationBase.cs
- CompiledRegexRunnerFactory.cs
- SafeNativeMethods.cs
- DataIdProcessor.cs
- MaterialGroup.cs
- SafeNativeMethods.cs
- ListViewTableCell.cs
- SQLDouble.cs
- MetadataSet.cs
- TextComposition.cs
- ListViewDeletedEventArgs.cs
- ParserStreamGeometryContext.cs
- SystemColors.cs
- ProxyAssemblyNotLoadedException.cs
- AsymmetricKeyExchangeDeformatter.cs
- TextSelectionHighlightLayer.cs
- CodeBlockBuilder.cs
- SQLString.cs
- WindowsTab.cs
- NetworkInterface.cs
- XmlNamespaceMapping.cs
- TreeNodeStyle.cs
- HttpHandlerActionCollection.cs
- ClockGroup.cs
- DesignerTransaction.cs
- SafeRightsManagementHandle.cs
- QuaternionAnimation.cs
- CfgSemanticTag.cs
- Variable.cs
- GenerateScriptTypeAttribute.cs
- UserInitiatedNavigationPermission.cs
- EditingCoordinator.cs
- OdbcStatementHandle.cs
- WebPartConnectVerb.cs
- FixedSOMTable.cs
- Panel.cs
- ServerProtocol.cs
- Identity.cs
- BinaryConverter.cs
- ListControlActionList.cs
- RawTextInputReport.cs
- XmlFormatExtensionPrefixAttribute.cs
- AncillaryOps.cs
- SecurityContext.cs
- UniqueIdentifierService.cs
- input.cs