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
- BlockingCollection.cs
- FolderLevelBuildProvider.cs
- sqlser.cs
- CodeCatchClause.cs
- AssemblyCache.cs
- UdpMessageProperty.cs
- GifBitmapEncoder.cs
- FrameworkTextComposition.cs
- List.cs
- XamlWriter.cs
- SqlNamer.cs
- AlternationConverter.cs
- DetailsViewCommandEventArgs.cs
- TransportSecurityBindingElement.cs
- XmlQueryType.cs
- TableRowCollection.cs
- AttributeCollection.cs
- ResourcePart.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- GifBitmapEncoder.cs
- NamespaceCollection.cs
- ComAdminWrapper.cs
- RegisteredHiddenField.cs
- Timer.cs
- BooleanFacetDescriptionElement.cs
- NumericUpDownAccelerationCollection.cs
- Assembly.cs
- GroupBox.cs
- DES.cs
- XmlSchemaSimpleContentRestriction.cs
- WebReferencesBuildProvider.cs
- TableColumn.cs
- BuildProvider.cs
- XsltLibrary.cs
- UTF7Encoding.cs
- DesignerInterfaces.cs
- RouteTable.cs
- InkCanvasSelectionAdorner.cs
- TypeUsage.cs
- SpellerInterop.cs
- ChangeBlockUndoRecord.cs
- SingleAnimationBase.cs
- Error.cs
- ServiceOperation.cs
- IndexingContentUnit.cs
- RawTextInputReport.cs
- Pointer.cs
- Substitution.cs
- PartialList.cs
- SubclassTypeValidator.cs
- LongTypeConverter.cs
- DataTableExtensions.cs
- WebPartHelpVerb.cs
- JavaScriptString.cs
- CategoryAttribute.cs
- SqlConnectionPoolGroupProviderInfo.cs
- XmlMapping.cs
- RemoteEndpointMessageProperty.cs
- ProcessModuleCollection.cs
- PerformanceCountersElement.cs
- SelectionRangeConverter.cs
- StylusPointProperty.cs
- ResourcePool.cs
- CriticalFinalizerObject.cs
- SpellerError.cs
- Transform3DCollection.cs
- TranslateTransform.cs
- SoapAttributeAttribute.cs
- PrintController.cs
- Permission.cs
- NonSerializedAttribute.cs
- SeverityFilter.cs
- HandleRef.cs
- PerformanceCounterPermissionAttribute.cs
- ImpersonateTokenRef.cs
- DataSourceConverter.cs
- TablePatternIdentifiers.cs
- UnsupportedPolicyOptionsException.cs
- SourceElementsCollection.cs
- JsonReader.cs
- BookmarkList.cs
- ObjectIDGenerator.cs
- SkinBuilder.cs
- IISMapPath.cs
- TextRangeBase.cs
- TrustManager.cs
- SequenceDesigner.xaml.cs
- SchemaComplexType.cs
- _SslSessionsCache.cs
- XpsFixedPageReaderWriter.cs
- ConfigurationStrings.cs
- IteratorFilter.cs
- ScrollViewerAutomationPeer.cs
- TrackingMemoryStreamFactory.cs
- ContextStack.cs
- ServiceReference.cs
- ArgumentsParser.cs
- PageThemeCodeDomTreeGenerator.cs
- SystemTcpStatistics.cs
- PopOutPanel.cs