Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / XNameConverter.cs / 1305376 / XNameConverter.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Activities.Presentation { using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Xml.Linq; [SuppressMessage("XAML", "XAML1004", Justification = "We want to keep this for internal use by the WorkflowDesigner assemblies.")] sealed class XNameConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return typeof(string) == sourceType; } public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { string currentValue = (string)value; XName result = null; if (null != currentValue) { result = currentValue; } return result; } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return typeof(string) == destinationType; } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { XName currentValue = (XName)value; string result = null; if (null != currentValue) { result = currentValue.ToString(); } return result; } } } // 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
- ViewCellSlot.cs
- GPPOINTF.cs
- FocusManager.cs
- SplayTreeNode.cs
- ServiceOperationWrapper.cs
- Attributes.cs
- SqlConnectionPoolGroupProviderInfo.cs
- UnsignedPublishLicense.cs
- IgnoreDeviceFilterElement.cs
- AstTree.cs
- FileDialog.cs
- ProcessHostConfigUtils.cs
- UdpTransportBindingElement.cs
- SoapHttpTransportImporter.cs
- BindingOperations.cs
- WebServiceReceive.cs
- ContextStack.cs
- DateTimeFormatInfo.cs
- DrawingAttributeSerializer.cs
- PropertyContainer.cs
- RangeValuePatternIdentifiers.cs
- Activator.cs
- PrintPageEvent.cs
- GeometryHitTestResult.cs
- AtomServiceDocumentSerializer.cs
- ConfigViewGenerator.cs
- Point3DAnimation.cs
- DocumentPage.cs
- DecimalKeyFrameCollection.cs
- TabRenderer.cs
- ProxyHelper.cs
- SqlTriggerContext.cs
- XmlSecureResolver.cs
- NavigatingCancelEventArgs.cs
- PeerUnsafeNativeCryptMethods.cs
- AstNode.cs
- ItemAutomationPeer.cs
- SoapExtensionImporter.cs
- ObjectTag.cs
- GenericParameterDataContract.cs
- ToolboxItemFilterAttribute.cs
- Run.cs
- TextServicesCompartmentContext.cs
- SimpleHandlerBuildProvider.cs
- AutomationElementCollection.cs
- ButtonBaseDesigner.cs
- NavigationPropertyEmitter.cs
- AVElementHelper.cs
- SerialErrors.cs
- DynamicArgumentDesigner.xaml.cs
- BamlRecordReader.cs
- BinaryWriter.cs
- XmlQueryTypeFactory.cs
- ISessionStateStore.cs
- UnitySerializationHolder.cs
- LinkedResource.cs
- Debug.cs
- DbParameterCollectionHelper.cs
- DelayedRegex.cs
- PropertyGroupDescription.cs
- CultureInfoConverter.cs
- PropertyEmitter.cs
- FtpCachePolicyElement.cs
- SqlDelegatedTransaction.cs
- WindowsGraphics.cs
- EventRoute.cs
- MessageQueuePermissionEntry.cs
- PropertyEntry.cs
- UpdateTracker.cs
- FamilyCollection.cs
- TemplateXamlParser.cs
- XmlRawWriterWrapper.cs
- SizeAnimationUsingKeyFrames.cs
- ContentIterators.cs
- DataServiceRequestOfT.cs
- EnvelopedPkcs7.cs
- VectorAnimationUsingKeyFrames.cs
- ConcurrentBag.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- EdmValidator.cs
- ChangePassword.cs
- MasterPageBuildProvider.cs
- Intellisense.cs
- DataTable.cs
- PropertyRef.cs
- AttributeProviderAttribute.cs
- NullableLongAverageAggregationOperator.cs
- PackageFilter.cs
- XmlWriter.cs
- SoapBinding.cs
- LinqDataSourceHelper.cs
- OutputWindow.cs
- ConfigurationManager.cs
- DataPagerField.cs
- CodeCompiler.cs
- XmlSubtreeReader.cs
- DataGridHeaderBorder.cs
- VirtualizingStackPanel.cs
- LOSFormatter.cs
- SettingsProperty.cs