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
- DoubleCollectionConverter.cs
- EventBuilder.cs
- EntityWithChangeTrackerStrategy.cs
- CommandID.cs
- Brush.cs
- CodeAttributeArgument.cs
- QilFunction.cs
- AxParameterData.cs
- RectangleConverter.cs
- SeekStoryboard.cs
- PropertyChangingEventArgs.cs
- SystemIPGlobalProperties.cs
- ExpandSegment.cs
- Selector.cs
- ErrorTableItemStyle.cs
- ReflectionTypeLoadException.cs
- TextTreeInsertElementUndoUnit.cs
- ParameterCollection.cs
- CustomErrorCollection.cs
- MessageContractAttribute.cs
- IgnoreSection.cs
- ByteStreamMessageEncoderFactory.cs
- ObjectQueryExecutionPlan.cs
- ExcludeFromCodeCoverageAttribute.cs
- ListItem.cs
- DataBindingCollection.cs
- SortKey.cs
- XmlLoader.cs
- SafeEventLogWriteHandle.cs
- InputBinding.cs
- HandlerFactoryWrapper.cs
- ReadWriteSpinLock.cs
- InvalidComObjectException.cs
- XmlSchemaValidator.cs
- UInt64.cs
- Ops.cs
- DataGridViewRowPrePaintEventArgs.cs
- LinqDataSourceValidationException.cs
- HelpProvider.cs
- Brushes.cs
- BooleanExpr.cs
- Gdiplus.cs
- DataContext.cs
- SQLDateTimeStorage.cs
- Buffer.cs
- SqlBuffer.cs
- ResourceDefaultValueAttribute.cs
- FontUnit.cs
- CanonicalFontFamilyReference.cs
- ObjRef.cs
- RowParagraph.cs
- EventSourceCreationData.cs
- PingOptions.cs
- ItemCheckEvent.cs
- ColumnCollection.cs
- PermissionSet.cs
- SHA256Managed.cs
- Timer.cs
- RouteValueDictionary.cs
- DataGridTextBoxColumn.cs
- ParserHooks.cs
- embossbitmapeffect.cs
- EndOfStreamException.cs
- DocumentOutline.cs
- XmlSchemaSimpleContentExtension.cs
- ErrorProvider.cs
- PenThread.cs
- HttpBrowserCapabilitiesWrapper.cs
- ConfigurationManagerInternalFactory.cs
- smtppermission.cs
- Application.cs
- DrawingBrush.cs
- ShaderEffect.cs
- ConnectionStringsExpressionEditor.cs
- RestClientProxyHandler.cs
- ToolZone.cs
- Encoder.cs
- CqlQuery.cs
- StickyNoteHelper.cs
- RoleGroup.cs
- SchemaHelper.cs
- PrivilegeNotHeldException.cs
- SymbolDocumentInfo.cs
- ObjectStateEntryDbDataRecord.cs
- SiteOfOriginContainer.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- Currency.cs
- StateChangeEvent.cs
- HttpCacheVary.cs
- ColorMatrix.cs
- SqlClientFactory.cs
- ImageListStreamer.cs
- ResourceDictionary.cs
- Label.cs
- BamlBinaryReader.cs
- UserControl.cs
- SmiContext.cs
- _AutoWebProxyScriptEngine.cs
- WindowsToolbarAsMenu.cs
- NullableDoubleAverageAggregationOperator.cs