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
- QueryOperationResponseOfT.cs
- ClientBuildManagerCallback.cs
- WSHttpTransportSecurityElement.cs
- ConfigurationStrings.cs
- Int16Storage.cs
- RequestTimeoutManager.cs
- CustomTypeDescriptor.cs
- cookieexception.cs
- CompilerResults.cs
- MultiBinding.cs
- Transform.cs
- CodeTypeMemberCollection.cs
- FileChangeNotifier.cs
- ImageButton.cs
- UshortList2.cs
- WebPartsPersonalization.cs
- ServiceRoute.cs
- SafeRightsManagementHandle.cs
- TemplateControlParser.cs
- SQLDateTime.cs
- RoleManagerModule.cs
- PrintingPermissionAttribute.cs
- RemoteHelper.cs
- DynamicValidator.cs
- ColorConverter.cs
- TemplateColumn.cs
- XmlSchemaAppInfo.cs
- UpDownBase.cs
- LinkedList.cs
- RichTextBoxConstants.cs
- EastAsianLunisolarCalendar.cs
- SqlMethodCallConverter.cs
- ReadOnlyCollectionBase.cs
- HttpCookiesSection.cs
- CommonDialog.cs
- ProfessionalColors.cs
- XmlDataSource.cs
- UpdateCompiler.cs
- OperatingSystem.cs
- Color.cs
- RadioButtonList.cs
- _SslStream.cs
- RelatedView.cs
- AutomationElement.cs
- DeferredReference.cs
- DesignerLoader.cs
- StdRegProviderWrapper.cs
- PropagatorResult.cs
- UnsafeNativeMethods.cs
- DocumentOrderQuery.cs
- SoapProtocolReflector.cs
- ConfigXmlDocument.cs
- SqlSelectStatement.cs
- TextBoxBaseDesigner.cs
- SmtpMail.cs
- EntityDataSourceChangingEventArgs.cs
- ArrayEditor.cs
- CodeDelegateInvokeExpression.cs
- TriggerCollection.cs
- DiscreteKeyFrames.cs
- _ConnectOverlappedAsyncResult.cs
- AlphabeticalEnumConverter.cs
- ContentPosition.cs
- TextRunCacheImp.cs
- DrawingServices.cs
- HttpSessionStateBase.cs
- Enumerable.cs
- SerializableAttribute.cs
- PartialCachingAttribute.cs
- TableCell.cs
- controlskin.cs
- AppSettingsExpressionEditor.cs
- TypeSource.cs
- EventQueueState.cs
- MatrixUtil.cs
- LineBreakRecord.cs
- ColumnResult.cs
- DrawingContextDrawingContextWalker.cs
- TreeNode.cs
- DataRow.cs
- FactoryGenerator.cs
- Int16Storage.cs
- LongValidator.cs
- ExpressionConverter.cs
- XsltFunctions.cs
- EventLogEntryCollection.cs
- SamlSerializer.cs
- FontDifferentiator.cs
- WebUtil.cs
- ZipQueryOperator.cs
- XmlSerializerSection.cs
- XmlMessageFormatter.cs
- MenuStrip.cs
- DataControlButton.cs
- HandoffBehavior.cs
- XmlUnspecifiedAttribute.cs
- TrustManagerPromptUI.cs
- StringToken.cs
- EmptyArray.cs
- ServiceModelEnumValidatorAttribute.cs