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
- HwndSource.cs
- GlyphElement.cs
- MetadataSource.cs
- HGlobalSafeHandle.cs
- XsdBuildProvider.cs
- GridViewPageEventArgs.cs
- PersistChildrenAttribute.cs
- ExtendedProperty.cs
- RequestStatusBarUpdateEventArgs.cs
- ModifierKeysConverter.cs
- QualifiedId.cs
- WebConfigurationHostFileChange.cs
- OneToOneMappingSerializer.cs
- ASCIIEncoding.cs
- DocumentManager.cs
- PinnedBufferMemoryStream.cs
- HtmlInputRadioButton.cs
- ThemeableAttribute.cs
- WindowsGrip.cs
- Size3DConverter.cs
- PersistChildrenAttribute.cs
- COAUTHIDENTITY.cs
- FakeModelPropertyImpl.cs
- ChunkedMemoryStream.cs
- FlowDocumentReader.cs
- XmlILIndex.cs
- CompensationHandlingFilter.cs
- LoginCancelEventArgs.cs
- RadialGradientBrush.cs
- DataGridViewCheckBoxColumn.cs
- RequestContext.cs
- StructuredCompositeActivityDesigner.cs
- SettingsPropertyValue.cs
- PeerTransportListenAddressValidator.cs
- OdbcDataReader.cs
- Pair.cs
- webclient.cs
- GB18030Encoding.cs
- SocketPermission.cs
- PassportAuthentication.cs
- RightsManagementEncryptionTransform.cs
- XmlSchemaDocumentation.cs
- PauseStoryboard.cs
- XmlCustomFormatter.cs
- ToolboxComponentsCreatingEventArgs.cs
- RegionIterator.cs
- TemplateControlCodeDomTreeGenerator.cs
- HttpFileCollection.cs
- MulticastNotSupportedException.cs
- WebPartEditorOkVerb.cs
- RelationshipNavigation.cs
- ProfileElement.cs
- XmlSchemaGroupRef.cs
- RepeatBehavior.cs
- __ComObject.cs
- CustomWebEventKey.cs
- ProtocolsConfigurationHandler.cs
- InitializationEventAttribute.cs
- WindowsFormsSynchronizationContext.cs
- StorageInfo.cs
- SoapConverter.cs
- TransformConverter.cs
- XhtmlBasicPanelAdapter.cs
- CompositeCollection.cs
- Baml2006ReaderFrame.cs
- XPathDocumentIterator.cs
- PkcsUtils.cs
- EventLogReader.cs
- _NativeSSPI.cs
- CatalogZone.cs
- DataSourceHelper.cs
- Form.cs
- PermissionAttributes.cs
- HandleRef.cs
- WebPartZone.cs
- OrderedHashRepartitionEnumerator.cs
- HtmlInputText.cs
- WsatAdminException.cs
- DataBindEngine.cs
- BindingEntityInfo.cs
- StatusBarItem.cs
- TreeViewItemAutomationPeer.cs
- Page.cs
- ObjectDataSourceEventArgs.cs
- SqlClientWrapperSmiStreamChars.cs
- RegistrationServices.cs
- FrameworkElement.cs
- SmiRecordBuffer.cs
- ListItemCollection.cs
- CodeVariableReferenceExpression.cs
- SchemaMerger.cs
- PropertyContainer.cs
- DataGridViewDataErrorEventArgs.cs
- DoubleAverageAggregationOperator.cs
- Tag.cs
- ProcessHostMapPath.cs
- BuildProvider.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- SqlCacheDependencyDatabaseCollection.cs
- cookieexception.cs