Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Activities / System / ServiceModel / XamlIntegration / EndpointIdentityConverter.cs / 1305376 / EndpointIdentityConverter.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.ServiceModel.XamlIntegration { using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime; using System.Windows.Markup; [SuppressMessage(FxCop.Category.Xaml, "XAML1012", Justification = "ConvertFrom methods are not required for MarkupExtension converters")] public class EndpointIdentityConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(MarkupExtension)) { return true; } return base.CanConvertTo(context, destinationType); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (value == null) { return null; } if (destinationType == typeof(MarkupExtension) && value is EndpointIdentity) { if (value is SpnEndpointIdentity) { return new SpnEndpointIdentityExtension((SpnEndpointIdentity)value); } else if (value is UpnEndpointIdentity) { return new UpnEndpointIdentityExtension((UpnEndpointIdentity)value); } else { return new EndpointIdentityExtension((EndpointIdentity)value); } } return base.ConvertTo(context, culture, value, destinationType); } } } // 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
- PaperSize.cs
- CompiledQuery.cs
- ChannelDispatcherCollection.cs
- RoutedEventConverter.cs
- ExceptionValidationRule.cs
- WsatAdminException.cs
- UTF8Encoding.cs
- unitconverter.cs
- EntityFrameworkVersions.cs
- FillErrorEventArgs.cs
- SystemUdpStatistics.cs
- HMACSHA512.cs
- GlyphTypeface.cs
- SetStoryboardSpeedRatio.cs
- OrderedDictionaryStateHelper.cs
- ActionItem.cs
- SecureStringHasher.cs
- WindowInteropHelper.cs
- RegistryKey.cs
- Brushes.cs
- UserControl.cs
- XmlQueryOutput.cs
- BindingExpressionBase.cs
- ExpressionPrefixAttribute.cs
- DefaultValueConverter.cs
- XmlILTrace.cs
- EpmSourcePathSegment.cs
- RuntimeWrappedException.cs
- FrameworkElement.cs
- ConstrainedGroup.cs
- TextElementEnumerator.cs
- Table.cs
- PeerApplication.cs
- DocumentsTrace.cs
- AppSecurityManager.cs
- CreateUserWizard.cs
- EntityTypeBase.cs
- RuntimeConfigurationRecord.cs
- GradientStop.cs
- DataGridLinkButton.cs
- DataErrorValidationRule.cs
- embossbitmapeffect.cs
- TableRowGroupCollection.cs
- XmlUtil.cs
- Bidi.cs
- InlineObject.cs
- ObjectResult.cs
- CompiledRegexRunnerFactory.cs
- Sentence.cs
- SerializationBinder.cs
- RegexInterpreter.cs
- SoapSchemaImporter.cs
- TransportOutputChannel.cs
- SrgsItemList.cs
- GridViewRow.cs
- RecordsAffectedEventArgs.cs
- ConfigurationSettings.cs
- KeyValueInternalCollection.cs
- AsymmetricSecurityBindingElement.cs
- CancellationTokenRegistration.cs
- Table.cs
- ExceptionList.cs
- NameService.cs
- TemplateField.cs
- ExpandCollapseProviderWrapper.cs
- TdsParser.cs
- ScrollBarAutomationPeer.cs
- webproxy.cs
- TaskHelper.cs
- WebConvert.cs
- EditorPartChrome.cs
- GlyphInfoList.cs
- ListViewPagedDataSource.cs
- ToolStripSplitStackLayout.cs
- OpCopier.cs
- IntAverageAggregationOperator.cs
- TabOrder.cs
- ProfileProvider.cs
- IriParsingElement.cs
- DataGridTextBoxColumn.cs
- CodeGen.cs
- RuleSettingsCollection.cs
- MulticastDelegate.cs
- XmlAttributes.cs
- ListManagerBindingsCollection.cs
- ComponentConverter.cs
- SessionParameter.cs
- PeerContact.cs
- HttpConfigurationContext.cs
- ListViewDeleteEventArgs.cs
- BinHexDecoder.cs
- WebMethodAttribute.cs
- ThreadStaticAttribute.cs
- StylusPointProperty.cs
- InstallerTypeAttribute.cs
- DefaultValueConverter.cs
- RemotingException.cs
- AjaxFrameworkAssemblyAttribute.cs
- MenuAdapter.cs
- SoapFormatterSinks.cs