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
- NativeCompoundFileAPIs.cs
- SiteMap.cs
- FormViewInsertedEventArgs.cs
- CatalogPartCollection.cs
- DbProviderFactories.cs
- PopupRoot.cs
- CodeGenerationManager.cs
- DataGridViewRowConverter.cs
- TreeViewImageIndexConverter.cs
- ReadOnlyDataSource.cs
- SqlFacetAttribute.cs
- ListViewItem.cs
- GroupItemAutomationPeer.cs
- MarkupExtensionParser.cs
- smtpconnection.cs
- EventItfInfo.cs
- WorkflowMarkupSerializerMapping.cs
- EventItfInfo.cs
- ApplicationSettingsBase.cs
- TextFormatterImp.cs
- SQLDouble.cs
- PreviewPageInfo.cs
- PostBackTrigger.cs
- PanelDesigner.cs
- NameTable.cs
- EnumConverter.cs
- ConstNode.cs
- ThicknessConverter.cs
- Table.cs
- ComponentChangingEvent.cs
- SafeLocalMemHandle.cs
- Socket.cs
- ConstNode.cs
- CreateUserWizardStep.cs
- ServiceAppDomainAssociationProvider.cs
- PersonalizationStateInfo.cs
- ScriptMethodAttribute.cs
- WebPartEditorApplyVerb.cs
- FormViewUpdateEventArgs.cs
- InfoCardSymmetricAlgorithm.cs
- WebReferencesBuildProvider.cs
- ModuleConfigurationInfo.cs
- ModulesEntry.cs
- ProfileServiceManager.cs
- LayoutEngine.cs
- GatewayIPAddressInformationCollection.cs
- MatrixAnimationBase.cs
- WebConfigurationManager.cs
- GridViewItemAutomationPeer.cs
- MatrixTransform.cs
- Trace.cs
- BinHexEncoder.cs
- TripleDES.cs
- HttpWebRequestElement.cs
- WindowsListViewGroupHelper.cs
- SqlReorderer.cs
- GradientBrush.cs
- SelectionChangedEventArgs.cs
- _UncName.cs
- BlockUIContainer.cs
- UIElement3D.cs
- Transaction.cs
- DataColumnMapping.cs
- DrawingState.cs
- MessageQueueConverter.cs
- Rect3D.cs
- SignedXml.cs
- NoneExcludedImageIndexConverter.cs
- FlowDocumentPage.cs
- CatalogPartCollection.cs
- RuleConditionDialog.cs
- ColorDialog.cs
- ObjectDataSourceDisposingEventArgs.cs
- FrameworkPropertyMetadata.cs
- OutgoingWebResponseContext.cs
- DataGridViewDataConnection.cs
- BinaryReader.cs
- SHA1CryptoServiceProvider.cs
- DecoderNLS.cs
- mediapermission.cs
- VScrollProperties.cs
- ColumnHeader.cs
- WindowsAltTab.cs
- PackageDigitalSignatureManager.cs
- URLAttribute.cs
- SID.cs
- RegexGroup.cs
- KoreanCalendar.cs
- LogStream.cs
- DataGridTableCollection.cs
- DataViewManager.cs
- CompiledQuery.cs
- FormsAuthenticationUser.cs
- ZoomPercentageConverter.cs
- Hashtable.cs
- SecurityImpersonationBehavior.cs
- WriteLineDesigner.xaml.cs
- DependencyPropertyValueSerializer.cs
- AsymmetricSecurityProtocol.cs
- Identity.cs