Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / PeerTransportListenAddressConverter.cs / 1 / PeerTransportListenAddressConverter.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Net; using System.ServiceModel; using System.ServiceModel.Diagnostics; class PeerTransportListenAddressConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (typeof(string) == sourceType) { return true; } return base.CanConvertFrom(context, sourceType); } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (typeof(IPAddress) == destinationType) { return true; } return base.CanConvertTo(context, destinationType); } public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { if (value is string) { return IPAddress.Parse(value as string); } return base.ConvertFrom(context, culture, value); } public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (typeof(string) == destinationType && value is IPAddress) { return ((IPAddress)value).ToString(); } return base.ConvertTo(context, culture, value, destinationType); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PieceDirectory.cs
- MenuItem.cs
- OleDbPropertySetGuid.cs
- DataGridViewColumnStateChangedEventArgs.cs
- TablePatternIdentifiers.cs
- ToolStripSeparatorRenderEventArgs.cs
- CodeValidator.cs
- WebBrowserDocumentCompletedEventHandler.cs
- FontTypeConverter.cs
- CqlErrorHelper.cs
- InvalidateEvent.cs
- SetStoryboardSpeedRatio.cs
- SoapProtocolReflector.cs
- CharKeyFrameCollection.cs
- KnownBoxes.cs
- GroupBoxAutomationPeer.cs
- ControlValuePropertyAttribute.cs
- CryptoConfig.cs
- SuppressIldasmAttribute.cs
- Buffer.cs
- ProcessThreadCollection.cs
- NonSerializedAttribute.cs
- OracleDataReader.cs
- ByteAnimationUsingKeyFrames.cs
- Condition.cs
- ListenerSessionConnection.cs
- SelectQueryOperator.cs
- ListenerUnsafeNativeMethods.cs
- CodeVariableReferenceExpression.cs
- FontDriver.cs
- base64Transforms.cs
- DataObject.cs
- HttpServerVarsCollection.cs
- _CacheStreams.cs
- XmlEntityReference.cs
- ApplyTemplatesAction.cs
- WebServiceHostFactory.cs
- ButtonStandardAdapter.cs
- CharacterString.cs
- EdmItemCollection.OcAssemblyCache.cs
- Rss20ItemFormatter.cs
- AttributeQuery.cs
- LifetimeServices.cs
- ProcessInputEventArgs.cs
- GenericTextProperties.cs
- TargetInvocationException.cs
- _CacheStreams.cs
- Line.cs
- TextClipboardData.cs
- XmlSerializerSection.cs
- TabPage.cs
- indexingfiltermarshaler.cs
- UxThemeWrapper.cs
- CodeDOMUtility.cs
- ReadingWritingEntityEventArgs.cs
- FileLogRecordStream.cs
- BufferedMessageWriter.cs
- DoubleLinkListEnumerator.cs
- WebReferenceOptions.cs
- FastEncoder.cs
- QuadraticEase.cs
- RuntimeResourceSet.cs
- SelectionEditor.cs
- ListViewHitTestInfo.cs
- ValidationContext.cs
- ResXResourceSet.cs
- ResourcePermissionBaseEntry.cs
- CacheEntry.cs
- TextContainerHelper.cs
- XmlILOptimizerVisitor.cs
- Span.cs
- X509CertificateRecipientServiceCredential.cs
- ArrayHelper.cs
- DesignerDataSourceView.cs
- WindowsListViewGroup.cs
- RuleCache.cs
- MinMaxParagraphWidth.cs
- ConditionalAttribute.cs
- WindowsSecurityToken.cs
- SingleTagSectionHandler.cs
- SafeLocalMemHandle.cs
- DataRowView.cs
- Helper.cs
- updatecommandorderer.cs
- SemanticAnalyzer.cs
- TypeDescriptor.cs
- KeyNameIdentifierClause.cs
- TransformCryptoHandle.cs
- UIElement3DAutomationPeer.cs
- XamlHostingSection.cs
- HtmlHistory.cs
- SecurityPolicySection.cs
- InfoCardArgumentException.cs
- ListDataHelper.cs
- EntityDataSourceDesignerHelper.cs
- TextUtf8RawTextWriter.cs
- TextTreeText.cs
- sqlinternaltransaction.cs
- WCFServiceClientProxyGenerator.cs
- Tablet.cs