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
- CompiledELinqQueryState.cs
- Input.cs
- RegexRunner.cs
- securestring.cs
- XmlQuerySequence.cs
- CssClassPropertyAttribute.cs
- BaseValidatorDesigner.cs
- ConnectionProviderAttribute.cs
- Perspective.cs
- TextWriterTraceListener.cs
- ProtocolsSection.cs
- MaterialCollection.cs
- RegexReplacement.cs
- RunWorkerCompletedEventArgs.cs
- WinFormsUtils.cs
- DurableInstanceManager.cs
- SiteMapNodeItem.cs
- QueryPageSettingsEventArgs.cs
- PropertyMap.cs
- relpropertyhelper.cs
- BindingRestrictions.cs
- IndexerReference.cs
- IndentedWriter.cs
- Ref.cs
- ContextMenuStripActionList.cs
- ColorConvertedBitmap.cs
- InstanceStore.cs
- OverflowException.cs
- XmlIgnoreAttribute.cs
- bidPrivateBase.cs
- PropertyChangingEventArgs.cs
- AxHostDesigner.cs
- DataContractJsonSerializer.cs
- ListViewGroupConverter.cs
- followingsibling.cs
- RouteParameter.cs
- NameTable.cs
- Function.cs
- DragDrop.cs
- XPathMultyIterator.cs
- MessageSecurityOverTcpElement.cs
- CodeComment.cs
- _UriTypeConverter.cs
- TextRenderer.cs
- CryptoApi.cs
- HttpDebugHandler.cs
- LifetimeServices.cs
- DataGridViewAccessibleObject.cs
- TerminateDesigner.cs
- WsatServiceCertificate.cs
- SendMailErrorEventArgs.cs
- RemoteWebConfigurationHostStream.cs
- AdPostCacheSubstitution.cs
- TCEAdapterGenerator.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DependencyPropertyHelper.cs
- MasterPageCodeDomTreeGenerator.cs
- EntityFrameworkVersions.cs
- MembershipAdapter.cs
- ImageAnimator.cs
- BaseHashHelper.cs
- FontStretch.cs
- CurrencyWrapper.cs
- BindingBase.cs
- BamlBinaryReader.cs
- URLIdentityPermission.cs
- Geometry3D.cs
- BooleanConverter.cs
- FileNotFoundException.cs
- SHA384CryptoServiceProvider.cs
- DeobfuscatingStream.cs
- CopyAttributesAction.cs
- MSAANativeProvider.cs
- RC2.cs
- ProfileEventArgs.cs
- XPathScanner.cs
- DataComponentGenerator.cs
- WindowPatternIdentifiers.cs
- ViewStateModeByIdAttribute.cs
- XmlSchemaAnyAttribute.cs
- SoapExtensionTypeElement.cs
- WebBrowserDesigner.cs
- SqlRecordBuffer.cs
- SafeFileMapViewHandle.cs
- BindingsCollection.cs
- SmtpReplyReaderFactory.cs
- SplayTreeNode.cs
- SelectionRange.cs
- Quad.cs
- TypeDelegator.cs
- Sql8ConformanceChecker.cs
- Binding.cs
- CompilerTypeWithParams.cs
- ActivityTypeResolver.xaml.cs
- TdsParserHelperClasses.cs
- FloaterParagraph.cs
- LogRecordSequence.cs
- ByteFacetDescriptionElement.cs
- Compiler.cs
- PointCollection.cs