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
- Line.cs
- SaveFileDialog.cs
- DesignSurfaceManager.cs
- XmlSiteMapProvider.cs
- ResolveNameEventArgs.cs
- ObjectDisposedException.cs
- SelectingProviderEventArgs.cs
- Transform3D.cs
- TableLayoutStyleCollection.cs
- CompModSwitches.cs
- TrackingServices.cs
- ListItemCollection.cs
- DrawListViewItemEventArgs.cs
- PtsContext.cs
- coordinatorscratchpad.cs
- TransactionManager.cs
- XMLSchema.cs
- FixedDocumentPaginator.cs
- ActiveDocumentEvent.cs
- Parameter.cs
- BindingMAnagerBase.cs
- HtmlInputText.cs
- GridViewCommandEventArgs.cs
- NullableIntAverageAggregationOperator.cs
- FlowLayoutSettings.cs
- ScrollPattern.cs
- DataControlFieldCell.cs
- X509Chain.cs
- PreservationFileReader.cs
- PersonalizationState.cs
- SessionStateContainer.cs
- DataContractAttribute.cs
- SafeRegistryHandle.cs
- PropertyGrid.cs
- DocumentPageView.cs
- Crc32Helper.cs
- XmlDocumentFragment.cs
- PropertyGridView.cs
- XXXInfos.cs
- BamlWriter.cs
- UserNamePasswordServiceCredential.cs
- TcpHostedTransportConfiguration.cs
- HtmlProps.cs
- SafeHandle.cs
- CollectionBase.cs
- RedirectionProxy.cs
- WarningException.cs
- SqlUnionizer.cs
- ConnectionStringsExpressionBuilder.cs
- OleDbCommand.cs
- TreeViewImageIndexConverter.cs
- SendParametersContent.cs
- BitmapPalette.cs
- RowVisual.cs
- RunInstallerAttribute.cs
- CharacterBuffer.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- RestHandlerFactory.cs
- ParseHttpDate.cs
- Vector3DAnimationBase.cs
- ToolStripDropDownButton.cs
- Internal.cs
- DataGridSortCommandEventArgs.cs
- ResourceDisplayNameAttribute.cs
- EventLogTraceListener.cs
- UiaCoreApi.cs
- ToolboxComponentsCreatingEventArgs.cs
- TimeSpanMinutesConverter.cs
- Evaluator.cs
- AssemblyName.cs
- PagesSection.cs
- XmlEventCache.cs
- DesignTimeData.cs
- ChannelServices.cs
- WebBrowserBase.cs
- FixedElement.cs
- ParseChildrenAsPropertiesAttribute.cs
- FileSystemInfo.cs
- DesignerTransactionCloseEvent.cs
- GroupLabel.cs
- ComplusEndpointConfigContainer.cs
- basecomparevalidator.cs
- ProfileModule.cs
- jithelpers.cs
- UnsafeNativeMethods.cs
- PeerCollaboration.cs
- VectorCollectionValueSerializer.cs
- DbCommandTree.cs
- PenContexts.cs
- WriteStateInfoBase.cs
- ObjectListTitleAttribute.cs
- TagPrefixInfo.cs
- XmlQueryStaticData.cs
- SecurityUtils.cs
- CustomSignedXml.cs
- FileStream.cs
- RegisteredScript.cs
- InvokeProviderWrapper.cs
- ExceptionHelpers.cs
- BinaryKeyIdentifierClause.cs