Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- SqlInfoMessageEvent.cs
- PeerApplicationLaunchInfo.cs
- Transform3D.cs
- ResourceBinder.cs
- CharConverter.cs
- CollectionViewGroupRoot.cs
- Accessors.cs
- DataColumnMappingCollection.cs
- COAUTHIDENTITY.cs
- UnsupportedPolicyOptionsException.cs
- Timeline.cs
- VolatileResourceManager.cs
- ResourceProperty.cs
- ConnectionManagementElement.cs
- FindCriteriaElement.cs
- ActivityCodeDomSerializer.cs
- RestClientProxyHandler.cs
- OdbcError.cs
- DataGridViewCellLinkedList.cs
- TransformerInfoCollection.cs
- DefaultBinder.cs
- PropertyEmitterBase.cs
- OpenTypeCommon.cs
- OletxEnlistment.cs
- RepeatButton.cs
- DataGridItemCollection.cs
- XhtmlTextWriter.cs
- WmlSelectionListAdapter.cs
- SectionRecord.cs
- TimeoutValidationAttribute.cs
- NoneExcludedImageIndexConverter.cs
- HostedTransportConfigurationManager.cs
- DataGridViewColumnHeaderCell.cs
- DataListItem.cs
- TextServicesCompartment.cs
- ResourceReferenceExpression.cs
- CssStyleCollection.cs
- SQLDateTime.cs
- XmlException.cs
- IndicCharClassifier.cs
- TextServicesContext.cs
- SpoolingTask.cs
- SerializationException.cs
- ParameterToken.cs
- InvalidTimeZoneException.cs
- QuaternionAnimation.cs
- ThreadInterruptedException.cs
- HMACSHA512.cs
- InputLanguageEventArgs.cs
- SQLDouble.cs
- ConfigXmlText.cs
- StickyNoteHelper.cs
- ListControl.cs
- AttachedAnnotationChangedEventArgs.cs
- OptimisticConcurrencyException.cs
- EventRoute.cs
- XomlCompilerResults.cs
- Internal.cs
- Oid.cs
- MetaData.cs
- Point4DConverter.cs
- OperationAbortedException.cs
- WindowsGrip.cs
- XmlTextEncoder.cs
- LogicalExpr.cs
- FeatureSupport.cs
- ThreadExceptionDialog.cs
- GenericAuthenticationEventArgs.cs
- columnmapfactory.cs
- SimpleHandlerFactory.cs
- ModuleConfigurationInfo.cs
- PaintEvent.cs
- DiagnosticsConfiguration.cs
- _FixedSizeReader.cs
- SqlDataReaderSmi.cs
- Panel.cs
- PersonalizationStateQuery.cs
- SqlProcedureAttribute.cs
- AbandonedMutexException.cs
- FormView.cs
- HebrewCalendar.cs
- XmlSchemaInferenceException.cs
- DetailsViewUpdatedEventArgs.cs
- RawStylusInputReport.cs
- PersonalizationState.cs
- RC2.cs
- Button.cs
- ResponseBodyWriter.cs
- UTF32Encoding.cs
- ItemsPresenter.cs
- XhtmlConformanceSection.cs
- VisualState.cs
- Convert.cs
- BitmapData.cs
- TileModeValidation.cs
- StaticExtensionConverter.cs
- ConfigDefinitionUpdates.cs
- ImageDrawing.cs
- EditingCommands.cs
- PersonalizationDictionary.cs