Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- DelimitedListTraceListener.cs
- SchemaDeclBase.cs
- DeviceFiltersSection.cs
- CollectionViewGroupInternal.cs
- CanonicalFontFamilyReference.cs
- OutputCacheProfile.cs
- TextDataBindingHandler.cs
- RelationalExpressions.cs
- Triplet.cs
- MimeMapping.cs
- SqlDataSourceDesigner.cs
- TextProviderWrapper.cs
- WsatConfiguration.cs
- CodeCommentStatementCollection.cs
- documentsequencetextcontainer.cs
- DataRecordInternal.cs
- FrameDimension.cs
- OneOfElement.cs
- DataGridViewSortCompareEventArgs.cs
- WebServiceClientProxyGenerator.cs
- ZoomPercentageConverter.cs
- DataBinder.cs
- CharacterBufferReference.cs
- SafeProcessHandle.cs
- ResourcePermissionBaseEntry.cs
- RawKeyboardInputReport.cs
- ExtendedPropertyInfo.cs
- PeerContact.cs
- SqlGenerator.cs
- TableRowCollection.cs
- dbenumerator.cs
- OdbcConnectionHandle.cs
- HiddenFieldPageStatePersister.cs
- EmbeddedMailObject.cs
- DataViewListener.cs
- OletxVolatileEnlistment.cs
- DesignerEditorPartChrome.cs
- HtmlTitle.cs
- ListenerElementsCollection.cs
- TextFormatterHost.cs
- MethodBuilder.cs
- EventEntry.cs
- BroadcastEventHelper.cs
- SkinIDTypeConverter.cs
- JavascriptCallbackResponseProperty.cs
- BookmarkManager.cs
- hresults.cs
- FrameworkRichTextComposition.cs
- BinaryFormatterWriter.cs
- UIntPtr.cs
- AdPostCacheSubstitution.cs
- SiteMembershipCondition.cs
- FontDialog.cs
- XmlIncludeAttribute.cs
- RightsManagementEncryptedStream.cs
- FormsIdentity.cs
- SapiRecoContext.cs
- ImageIndexConverter.cs
- xamlnodes.cs
- RemoteWebConfigurationHostServer.cs
- XmlDataCollection.cs
- RightsManagementInformation.cs
- DataSourceHelper.cs
- RectangleHotSpot.cs
- ChangeToolStripParentVerb.cs
- DecimalStorage.cs
- BitmapEffectOutputConnector.cs
- SqlInternalConnection.cs
- HtmlAnchor.cs
- CodeNamespaceCollection.cs
- StylesEditorDialog.cs
- IPipelineRuntime.cs
- FixedFindEngine.cs
- XmlNodeList.cs
- DeferredTextReference.cs
- DirectoryLocalQuery.cs
- AnonymousIdentificationSection.cs
- SecurityException.cs
- GeneralTransform3DGroup.cs
- ExceptionHandlerDesigner.cs
- RemotingConfiguration.cs
- XPathDocument.cs
- WCFServiceClientProxyGenerator.cs
- RelationshipWrapper.cs
- DataGridView.cs
- LambdaCompiler.Binary.cs
- ClientRuntimeConfig.cs
- DefaultValueConverter.cs
- LightweightEntityWrapper.cs
- WebPartManager.cs
- HotSpot.cs
- SafeCryptoHandles.cs
- HostedHttpTransportManager.cs
- DeleteMemberBinder.cs
- DefaultClaimSet.cs
- ThreadExceptionEvent.cs
- ClickablePoint.cs
- PropertyGroupDescription.cs
- ObjectDataSourceStatusEventArgs.cs
- ResumeStoryboard.cs