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
- CompilationRelaxations.cs
- SID.cs
- ScriptingWebServicesSectionGroup.cs
- CacheAxisQuery.cs
- sqlinternaltransaction.cs
- PointAnimation.cs
- SoundPlayerAction.cs
- Walker.cs
- _ScatterGatherBuffers.cs
- CodeGenHelper.cs
- NativeActivityFaultContext.cs
- ProviderConnectionPoint.cs
- WebControlParameterProxy.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- CodeTryCatchFinallyStatement.cs
- Pair.cs
- ReferenceEqualityComparer.cs
- DataSourceControl.cs
- LogConverter.cs
- WebControl.cs
- DateRangeEvent.cs
- InstanceDataCollectionCollection.cs
- FileIOPermission.cs
- RegexRunnerFactory.cs
- StringUtil.cs
- DataGridViewDataConnection.cs
- LineServices.cs
- ApplySecurityAndSendAsyncResult.cs
- ConditionalAttribute.cs
- MetaType.cs
- FormsAuthentication.cs
- Sorting.cs
- CacheAxisQuery.cs
- XmlChildEnumerator.cs
- OracleNumber.cs
- MessageQueue.cs
- ThemeInfoAttribute.cs
- RadioButtonBaseAdapter.cs
- WindowsListViewItemStartMenu.cs
- FileLevelControlBuilderAttribute.cs
- PngBitmapDecoder.cs
- unsafenativemethodstextservices.cs
- DesignerAutoFormatStyle.cs
- WebPartRestoreVerb.cs
- TextElementAutomationPeer.cs
- RootProfilePropertySettingsCollection.cs
- ReferencedAssembly.cs
- PageThemeCodeDomTreeGenerator.cs
- LayoutTable.cs
- KoreanCalendar.cs
- MediaContext.cs
- PageAsyncTask.cs
- InputBuffer.cs
- ReadOnlyObservableCollection.cs
- RoleGroup.cs
- SplitterEvent.cs
- GrammarBuilder.cs
- SamlAction.cs
- SizeKeyFrameCollection.cs
- TimeManager.cs
- StringReader.cs
- CollectionChangedEventManager.cs
- StringWriter.cs
- AliasedSlot.cs
- AnnotationComponentChooser.cs
- InputLanguageCollection.cs
- HostingEnvironmentException.cs
- CollectionAdapters.cs
- DocumentPaginator.cs
- XmlExtensionFunction.cs
- SqlSelectStatement.cs
- Attributes.cs
- InstanceDescriptor.cs
- Freezable.cs
- AutomationPropertyInfo.cs
- FrameworkElement.cs
- Opcode.cs
- Hex.cs
- XamlPathDataSerializer.cs
- WebPartEditorOkVerb.cs
- MediaSystem.cs
- ArrayConverter.cs
- ListenerAdapter.cs
- ContextQuery.cs
- smtpconnection.cs
- PersonalizablePropertyEntry.cs
- Vector3dCollection.cs
- EncryptedPackageFilter.cs
- ActivityMarkupSerializationProvider.cs
- SqlDataAdapter.cs
- Ray3DHitTestResult.cs
- InvokePatternIdentifiers.cs
- CompositeFontParser.cs
- SecureStringHasher.cs
- ExpressionBuilder.cs
- DispatcherHookEventArgs.cs
- HtmlAnchor.cs
- BaseTemplateParser.cs
- SiteMapSection.cs
- NetworkStream.cs