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
- Delegate.cs
- DelegatingTypeDescriptionProvider.cs
- PopupRoot.cs
- ObjectDataSourceMethodEventArgs.cs
- Internal.cs
- FastEncoderWindow.cs
- CodeIdentifiers.cs
- RegistryKey.cs
- TemplateComponentConnector.cs
- SafeNativeHandle.cs
- FactorySettingsElement.cs
- DataGridViewAdvancedBorderStyle.cs
- CoTaskMemHandle.cs
- RelatedPropertyManager.cs
- HtmlGenericControl.cs
- WebPartRestoreVerb.cs
- httpserverutility.cs
- PropertyDescriptor.cs
- CodeFieldReferenceExpression.cs
- ErrorEventArgs.cs
- OracleParameterCollection.cs
- baseaxisquery.cs
- TextMetrics.cs
- Attributes.cs
- HMACMD5.cs
- PageTextBox.cs
- DataListItemCollection.cs
- ReversePositionQuery.cs
- DataSourceSerializationException.cs
- Material.cs
- InputProcessorProfiles.cs
- ReferencedAssemblyResolver.cs
- GorillaCodec.cs
- GregorianCalendar.cs
- ToolStripCustomTypeDescriptor.cs
- SkewTransform.cs
- DelayedRegex.cs
- SqlFactory.cs
- Mutex.cs
- BoundingRectTracker.cs
- CompoundFileStorageReference.cs
- X509RawDataKeyIdentifierClause.cs
- PolyQuadraticBezierSegment.cs
- NullRuntimeConfig.cs
- DataServiceExpressionVisitor.cs
- FileDialog.cs
- InfoCardArgumentException.cs
- DispatcherTimer.cs
- UpdateRecord.cs
- DataGridViewColumnConverter.cs
- VoiceObjectToken.cs
- FormatException.cs
- PseudoWebRequest.cs
- DependencyPropertyKey.cs
- XmlSchemaDocumentation.cs
- EventsTab.cs
- ToolStripItemRenderEventArgs.cs
- MDIControlStrip.cs
- ConstrainedGroup.cs
- Lease.cs
- GridEntryCollection.cs
- DetailsViewInsertedEventArgs.cs
- SplitContainer.cs
- RequestContextBase.cs
- ColorAnimationBase.cs
- NodeFunctions.cs
- SqlDataSourceView.cs
- DocumentPaginator.cs
- FilteredXmlReader.cs
- VideoDrawing.cs
- RepeatBehaviorConverter.cs
- OrderByQueryOptionExpression.cs
- SecondaryIndexDefinition.cs
- Tuple.cs
- ComponentEditorForm.cs
- OdbcConnection.cs
- SimpleHandlerFactory.cs
- SecurityUtils.cs
- SqlDataSource.cs
- TdsParserStateObject.cs
- SymbolPair.cs
- StylusSystemGestureEventArgs.cs
- DataGridLengthConverter.cs
- DeviceFilterEditorDialog.cs
- DispatcherOperation.cs
- ConstantProjectedSlot.cs
- PlanCompiler.cs
- ExcCanonicalXml.cs
- SqlTypesSchemaImporter.cs
- Cursor.cs
- GeometryModel3D.cs
- StaticExtensionConverter.cs
- WmlLiteralTextAdapter.cs
- ColumnMapProcessor.cs
- CursorConverter.cs
- ExpressionsCollectionEditor.cs
- WhereaboutsReader.cs
- exports.cs
- WindowsToolbarItemAsMenuItem.cs
- XmlReturnWriter.cs