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
- DNS.cs
- WaitForChangedResult.cs
- DataGridViewToolTip.cs
- Variable.cs
- OverflowException.cs
- CategoryValueConverter.cs
- DataPager.cs
- SettingsContext.cs
- TabControl.cs
- Facet.cs
- TypedReference.cs
- XhtmlBasicLiteralTextAdapter.cs
- ButtonColumn.cs
- PageRequestManager.cs
- DataTransferEventArgs.cs
- RealizationContext.cs
- Byte.cs
- DateTimeOffset.cs
- TaiwanLunisolarCalendar.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- DataBoundControlAdapter.cs
- FunctionNode.cs
- StringComparer.cs
- AlignmentYValidation.cs
- odbcmetadatafactory.cs
- MbpInfo.cs
- Double.cs
- MultiPropertyDescriptorGridEntry.cs
- SQLByteStorage.cs
- Label.cs
- ClientTargetCollection.cs
- AttributeData.cs
- ProxyManager.cs
- SingleObjectCollection.cs
- DataGridPageChangedEventArgs.cs
- Trigger.cs
- OracleDataAdapter.cs
- MemberAccessException.cs
- LineInfo.cs
- VBIdentifierNameEditor.cs
- IPAddress.cs
- Quaternion.cs
- SerialStream.cs
- RootProfilePropertySettingsCollection.cs
- ThreadStaticAttribute.cs
- ExtensionFile.cs
- AnonymousIdentificationSection.cs
- DodSequenceMerge.cs
- CompositeKey.cs
- AtlasWeb.Designer.cs
- CfgRule.cs
- TaiwanCalendar.cs
- SymLanguageType.cs
- FrameworkElementFactory.cs
- StyleXamlParser.cs
- ListViewHitTestInfo.cs
- CursorConverter.cs
- Pair.cs
- LineMetrics.cs
- ServiceModelSectionGroup.cs
- TrackingProfileCache.cs
- TextElementAutomationPeer.cs
- QueryAsyncResult.cs
- StrongNameUtility.cs
- User.cs
- SafeMILHandle.cs
- NumericUpDown.cs
- Logging.cs
- WmfPlaceableFileHeader.cs
- TextRunProperties.cs
- XamlStyleSerializer.cs
- FormViewUpdatedEventArgs.cs
- WebPartChrome.cs
- MatchingStyle.cs
- DetailsViewPageEventArgs.cs
- MergeEnumerator.cs
- HtmlImageAdapter.cs
- Pen.cs
- UnsafeNativeMethods.cs
- InvalidPrinterException.cs
- ZipIORawDataFileBlock.cs
- RC2.cs
- CodeCommentStatement.cs
- DocumentSchemaValidator.cs
- FrameworkElement.cs
- HtmlFormWrapper.cs
- HandoffBehavior.cs
- assertwrapper.cs
- XmlWhitespace.cs
- QueryOperationResponseOfT.cs
- SerialPort.cs
- BaseCAMarshaler.cs
- TimeManager.cs
- PingReply.cs
- Splitter.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- InfocardChannelParameter.cs
- StringInfo.cs
- Span.cs
- PhysicalFontFamily.cs