Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- XmlEncoding.cs
- PanelDesigner.cs
- SecurityUniqueId.cs
- FontWeightConverter.cs
- Style.cs
- ExportOptions.cs
- FormViewUpdateEventArgs.cs
- RayHitTestParameters.cs
- ConfigurationElementProperty.cs
- DeclaredTypeElement.cs
- listitem.cs
- ExtentKey.cs
- SourceChangedEventArgs.cs
- EdmConstants.cs
- Rotation3DAnimationBase.cs
- CollectionBase.cs
- DataServiceQueryProvider.cs
- ConfigurationManager.cs
- RoutedEventHandlerInfo.cs
- CollectionViewProxy.cs
- ToolStripItemEventArgs.cs
- UIInitializationException.cs
- ExceptionNotification.cs
- RequestCacheValidator.cs
- OleDbCommand.cs
- DataGridParentRows.cs
- SizeValueSerializer.cs
- ProviderManager.cs
- EmbeddedMailObject.cs
- FormViewModeEventArgs.cs
- DrawingImage.cs
- DateTimeParse.cs
- RunClient.cs
- SQLDecimal.cs
- DataGridClipboardCellContent.cs
- TrackBarDesigner.cs
- OdbcParameterCollection.cs
- TreeBuilderBamlTranslator.cs
- ServiceMetadataPublishingElement.cs
- XmlChildNodes.cs
- WebPartDeleteVerb.cs
- HyperLink.cs
- UseAttributeSetsAction.cs
- HttpRuntimeSection.cs
- Slider.cs
- InvokeProviderWrapper.cs
- ImageAnimator.cs
- WebPartConnectionsCloseVerb.cs
- XMLDiffLoader.cs
- ConstraintManager.cs
- VisualBrush.cs
- ObjectQuery_EntitySqlExtensions.cs
- CodeTypeMember.cs
- EmptyTextWriter.cs
- DataTransferEventArgs.cs
- WindowsScrollBar.cs
- HitTestWithGeometryDrawingContextWalker.cs
- BidPrivateBase.cs
- QueryOperationResponseOfT.cs
- RegistrySecurity.cs
- RegexCharClass.cs
- RenamedEventArgs.cs
- AnonymousIdentificationSection.cs
- ProvidersHelper.cs
- DataServiceProviderWrapper.cs
- LambdaCompiler.Address.cs
- SystemNetworkInterface.cs
- DBPropSet.cs
- TemplateAction.cs
- StrongNameKeyPair.cs
- XmlSchemaSimpleContent.cs
- SqlTriggerAttribute.cs
- HostUtils.cs
- CompositeActivityDesigner.cs
- QueryMath.cs
- XmlNamespaceDeclarationsAttribute.cs
- AssemblyName.cs
- HttpAsyncResult.cs
- PeerNameRecordCollection.cs
- SoapRpcMethodAttribute.cs
- SolidColorBrush.cs
- UpdateManifestForBrowserApplication.cs
- GraphicsContext.cs
- FtpRequestCacheValidator.cs
- URLIdentityPermission.cs
- CqlErrorHelper.cs
- FixedSchema.cs
- CacheEntry.cs
- SqlNode.cs
- FormsAuthenticationCredentials.cs
- GiveFeedbackEvent.cs
- WindowsToolbar.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- GridView.cs
- TearOffProxy.cs
- SelectionWordBreaker.cs
- precedingsibling.cs
- AncestorChangedEventArgs.cs
- RightsManagementEncryptedStream.cs
- CodeDomDecompiler.cs