Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Base / System / Windows / ExpressionConverter.cs / 1 / ExpressionConverter.cs
//---------------------------------------------------------------------------- // // File: ExpressionConverter.cs // // Description: // TypeConverter for a generic property value expression // // Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Globalization; using System.ComponentModel.Design.Serialization; namespace System.Windows { ////// TypeConverter for a generic property value expression /// ////// The cole purpose of this TypeConveret is to block the /// default TypeConverter/ ToString() behavior /// public class ExpressionConverter : TypeConverter { ////// TypeConverter method override. /// /// /// ITypeDescriptorContext /// /// /// Type to convert from /// ////// true if conversion is possible /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return false; } ////// TypeConverter method override. /// /// /// ITypeDescriptorContext /// /// /// Type to convert to /// ////// true if conversion is possible /// public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return false; } ////// TypeConverter method implementation. /// /// /// ITypeDescriptorContext /// /// /// current culture (see CLR specs) /// /// /// value to convert from /// ////// value that is result of conversion /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { throw GetConvertFromException(value); } ////// TypeConverter method implementation. /// /// /// ITypeDescriptorContext /// /// /// current culture (see CLR specs) /// /// /// value to convert from /// /// /// Type to convert to /// ////// converted value /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { throw GetConvertToException(value, destinationType); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: ExpressionConverter.cs // // Description: // TypeConverter for a generic property value expression // // Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Globalization; using System.ComponentModel.Design.Serialization; namespace System.Windows { ////// TypeConverter for a generic property value expression /// ////// The cole purpose of this TypeConveret is to block the /// default TypeConverter/ ToString() behavior /// public class ExpressionConverter : TypeConverter { ////// TypeConverter method override. /// /// /// ITypeDescriptorContext /// /// /// Type to convert from /// ////// true if conversion is possible /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return false; } ////// TypeConverter method override. /// /// /// ITypeDescriptorContext /// /// /// Type to convert to /// ////// true if conversion is possible /// public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return false; } ////// TypeConverter method implementation. /// /// /// ITypeDescriptorContext /// /// /// current culture (see CLR specs) /// /// /// value to convert from /// ////// value that is result of conversion /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { throw GetConvertFromException(value); } ////// TypeConverter method implementation. /// /// /// ITypeDescriptorContext /// /// /// current culture (see CLR specs) /// /// /// value to convert from /// /// /// Type to convert to /// ////// converted value /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { throw GetConvertToException(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
- FontStretches.cs
- ClientSideProviderDescription.cs
- BigInt.cs
- GridViewItemAutomationPeer.cs
- SymmetricKeyWrap.cs
- UInt32.cs
- UriExt.cs
- FixedTextView.cs
- _LazyAsyncResult.cs
- SendKeys.cs
- CachedTypeface.cs
- OleDbConnectionFactory.cs
- StatusBarDesigner.cs
- ExceptionWrapper.cs
- StatusBarDrawItemEvent.cs
- WebSysDefaultValueAttribute.cs
- WebScriptMetadataMessage.cs
- Vars.cs
- wmiprovider.cs
- MultiSelectRootGridEntry.cs
- _NTAuthentication.cs
- GiveFeedbackEventArgs.cs
- CellConstantDomain.cs
- PathNode.cs
- NetworkInterface.cs
- storepermissionattribute.cs
- XmlObjectSerializerReadContextComplex.cs
- EventProviderWriter.cs
- SignedXml.cs
- XmlAttributeCache.cs
- followingquery.cs
- ModelFunction.cs
- UnsafeNativeMethodsCLR.cs
- HtmlEncodedRawTextWriter.cs
- AppDomainResourcePerfCounters.cs
- DesignObjectWrapper.cs
- Path.cs
- Margins.cs
- GraphicsContext.cs
- ContentPosition.cs
- PackageRelationship.cs
- WebPartPersonalization.cs
- ConstraintConverter.cs
- Stacktrace.cs
- WebRequest.cs
- TouchesOverProperty.cs
- Manipulation.cs
- Scheduling.cs
- DataListItem.cs
- InvalidComObjectException.cs
- Timer.cs
- RegisteredDisposeScript.cs
- XmlWriter.cs
- Assembly.cs
- VectorConverter.cs
- VirtualPath.cs
- AppSettingsExpressionBuilder.cs
- TypeCollectionPropertyEditor.cs
- ReadOnlyDictionary.cs
- DataServiceHostWrapper.cs
- Int16Animation.cs
- CryptoHelper.cs
- PageStatePersister.cs
- RuntimeWrappedException.cs
- RuleSettingsCollection.cs
- WindowsScrollBarBits.cs
- SecurityNegotiationException.cs
- HwndPanningFeedback.cs
- MessageHeader.cs
- RemotingConfiguration.cs
- SchemaTableOptionalColumn.cs
- LayoutEditorPart.cs
- MimePart.cs
- RegionIterator.cs
- DocumentOrderComparer.cs
- AbsoluteQuery.cs
- BinaryUtilClasses.cs
- RichTextBoxDesigner.cs
- GridViewColumnHeaderAutomationPeer.cs
- XmlNamespaceDeclarationsAttribute.cs
- regiisutil.cs
- filewebresponse.cs
- CanonicalXml.cs
- EventManager.cs
- ListParagraph.cs
- CallbackHandler.cs
- BinaryReader.cs
- ApplicationSettingsBase.cs
- QueryAccessibilityHelpEvent.cs
- WebEventTraceProvider.cs
- MethodExecutor.cs
- SettingsAttributes.cs
- XpsDocumentEvent.cs
- EventLogInternal.cs
- AnnotationObservableCollection.cs
- TrustManagerMoreInformation.cs
- DataGridTable.cs
- SystemIPGlobalStatistics.cs
- DataContext.cs
- ApplyTemplatesAction.cs