Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / ExpressionConverter.cs / 1305600 / 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
- HtmlControlPersistable.cs
- QualifierSet.cs
- GradientStop.cs
- QuaternionAnimation.cs
- ContextItem.cs
- FormViewCommandEventArgs.cs
- DataContractJsonSerializer.cs
- Context.cs
- Int32EqualityComparer.cs
- ValidatorCompatibilityHelper.cs
- SQLSingle.cs
- HeaderUtility.cs
- IdleTimeoutMonitor.cs
- PersonalizationAdministration.cs
- SQLConvert.cs
- DataBoundControlHelper.cs
- SessionEndingCancelEventArgs.cs
- SqlServer2KCompatibilityAnnotation.cs
- XmlnsDictionary.cs
- PackWebResponse.cs
- FrameworkReadOnlyPropertyMetadata.cs
- FramingEncoders.cs
- URLMembershipCondition.cs
- IERequestCache.cs
- ProfilePropertySettings.cs
- LayoutTableCell.cs
- DataRowExtensions.cs
- MultiTouchSystemGestureLogic.cs
- ErrorEventArgs.cs
- XhtmlCssHandler.cs
- SEHException.cs
- BindingContext.cs
- HtmlTableRowCollection.cs
- BitmapEffectInput.cs
- DataGridViewAdvancedBorderStyle.cs
- OperationContextScope.cs
- DataBoundControlParameterTarget.cs
- TextProperties.cs
- StylusPlugin.cs
- WsatServiceCertificate.cs
- UInt64Converter.cs
- DateTimePicker.cs
- KeyTimeConverter.cs
- ScriptingWebServicesSectionGroup.cs
- Transactions.cs
- StateManager.cs
- ActivityStatusChangeEventArgs.cs
- OperandQuery.cs
- ParameterCollection.cs
- XpsColorContext.cs
- DataTableReader.cs
- HtmlUtf8RawTextWriter.cs
- SqlTriggerContext.cs
- TextTreeRootNode.cs
- XmlReflectionImporter.cs
- DynamicField.cs
- SessionStateContainer.cs
- UnsafeNetInfoNativeMethods.cs
- LicenseException.cs
- TrackingServices.cs
- Missing.cs
- Currency.cs
- Int32Rect.cs
- SystemWebSectionGroup.cs
- EmptyReadOnlyDictionaryInternal.cs
- SessionStateSection.cs
- ProvideValueServiceProvider.cs
- ExceptionUtil.cs
- CallbackValidator.cs
- ProgressBarHighlightConverter.cs
- SqlBinder.cs
- SerializableAttribute.cs
- ServiceHttpModule.cs
- VBCodeProvider.cs
- FormViewCommandEventArgs.cs
- DesignerVerb.cs
- PersonalizationProvider.cs
- FigureParaClient.cs
- RecordsAffectedEventArgs.cs
- VerticalAlignConverter.cs
- CustomValidator.cs
- AttributeCollection.cs
- AttributeCollection.cs
- Transform.cs
- StructuralObject.cs
- EditCommandColumn.cs
- Queue.cs
- HwndProxyElementProvider.cs
- HiddenFieldPageStatePersister.cs
- TextModifier.cs
- EpmContentSerializerBase.cs
- DisableDpiAwarenessAttribute.cs
- LayoutEditorPart.cs
- SqlStream.cs
- IndividualDeviceConfig.cs
- TransportConfigurationTypeElementCollection.cs
- TypeSemantics.cs
- RenderOptions.cs
- AdRotator.cs
- Listen.cs