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
- ValidationSummary.cs
- XmlDataImplementation.cs
- ApplyImportsAction.cs
- ApplicationProxyInternal.cs
- PathFigure.cs
- DropShadowBitmapEffect.cs
- GifBitmapDecoder.cs
- RecommendedAsConfigurableAttribute.cs
- WebPartDisplayModeEventArgs.cs
- EDesignUtil.cs
- DbDataAdapter.cs
- PageParserFilter.cs
- XmlBinaryWriter.cs
- XmlSerializer.cs
- PlaceHolder.cs
- JournalEntryListConverter.cs
- MultipleCopiesCollection.cs
- ZipPackage.cs
- ValidationPropertyAttribute.cs
- LostFocusEventManager.cs
- NativeMethods.cs
- RectangleHotSpot.cs
- MenuItem.cs
- SoundPlayerAction.cs
- ClusterRegistryConfigurationProvider.cs
- ErrorTolerantObjectWriter.cs
- CannotUnloadAppDomainException.cs
- OlePropertyStructs.cs
- JapaneseCalendar.cs
- MenuItemAutomationPeer.cs
- MethodToken.cs
- InkCanvasFeedbackAdorner.cs
- XmlNamespaceDeclarationsAttribute.cs
- ResetableIterator.cs
- ApplicationBuildProvider.cs
- ComboBox.cs
- EnumValidator.cs
- WorkItem.cs
- TabControl.cs
- DataGridViewAdvancedBorderStyle.cs
- PropertyValue.cs
- EtwTrace.cs
- InputScopeConverter.cs
- SendMailErrorEventArgs.cs
- UserPersonalizationStateInfo.cs
- DesignerGenericWebPart.cs
- CheckBoxList.cs
- SID.cs
- HttpModuleActionCollection.cs
- EdmComplexTypeAttribute.cs
- ChannelDispatcherBase.cs
- SmtpNtlmAuthenticationModule.cs
- TextTreeTextElementNode.cs
- CultureData.cs
- PersianCalendar.cs
- ContentTypeSettingClientMessageFormatter.cs
- Dictionary.cs
- CodeNamespaceCollection.cs
- ToolStripSplitButton.cs
- BrowserTree.cs
- SessionStateItemCollection.cs
- BasePattern.cs
- Freezable.cs
- ListControlConvertEventArgs.cs
- DecimalConverter.cs
- Evaluator.cs
- StackSpiller.Bindings.cs
- ColumnCollectionEditor.cs
- WebPartCatalogCloseVerb.cs
- ValueOfAction.cs
- DbConnectionInternal.cs
- PrePrepareMethodAttribute.cs
- UdpDiscoveryEndpointElement.cs
- XmlValueConverter.cs
- ImmutableAssemblyCacheEntry.cs
- SizeKeyFrameCollection.cs
- MetadataProperty.cs
- Byte.cs
- Label.cs
- MemberMemberBinding.cs
- ReaderWriterLock.cs
- FixedPageAutomationPeer.cs
- SchemaImporterExtension.cs
- FontFamily.cs
- DispatcherObject.cs
- SecurityUtils.cs
- TableItemPattern.cs
- Shape.cs
- RecognizerBase.cs
- CopyOfAction.cs
- TextSchema.cs
- SqlError.cs
- BitmapEffectRenderDataResource.cs
- HiddenFieldPageStatePersister.cs
- CircleHotSpot.cs
- TextMessageEncodingBindingElement.cs
- Internal.cs
- ManagedWndProcTracker.cs
- RelOps.cs
- GorillaCodec.cs