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
- DataServiceHost.cs
- Int64.cs
- CompositeScriptReferenceEventArgs.cs
- AssertHelper.cs
- UserControlDesigner.cs
- _ScatterGatherBuffers.cs
- SkinBuilder.cs
- SafeHandles.cs
- TemplateEditingService.cs
- UserPrincipalNameElement.cs
- XmlDeclaration.cs
- InvokeHandlers.cs
- PartialCachingAttribute.cs
- UnsafeNativeMethods.cs
- StorageBasedPackageProperties.cs
- FontInfo.cs
- WindowsFormsLinkLabel.cs
- RemotingException.cs
- DeferredRunTextReference.cs
- RecognizedAudio.cs
- SHA256.cs
- XmlSchemaParticle.cs
- OracleString.cs
- SmtpClient.cs
- LayoutEvent.cs
- ScriptManager.cs
- PageContentCollection.cs
- MaskedTextBox.cs
- NonValidatingSecurityTokenAuthenticator.cs
- RelationshipNavigation.cs
- ManifestResourceInfo.cs
- ToolboxItemCollection.cs
- ServiceDebugElement.cs
- IpcClientManager.cs
- XmlFormatExtensionAttribute.cs
- ImageListUtils.cs
- WebControl.cs
- HtmlInputHidden.cs
- ThousandthOfEmRealDoubles.cs
- BooleanExpr.cs
- TextControl.cs
- LinqDataSourceInsertEventArgs.cs
- CuspData.cs
- AspNetCompatibilityRequirementsAttribute.cs
- SchemaTableOptionalColumn.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- ConditionCollection.cs
- SoapAttributes.cs
- ReceiveActivityValidator.cs
- RemotingSurrogateSelector.cs
- SqlException.cs
- SourceFileBuildProvider.cs
- DataGridState.cs
- HttpConfigurationContext.cs
- MultilineStringConverter.cs
- HttpPostedFileBase.cs
- CookieHandler.cs
- Itemizer.cs
- UnSafeCharBuffer.cs
- SqlBinder.cs
- Errors.cs
- TopClause.cs
- CursorConverter.cs
- KeyManager.cs
- HttpValueCollection.cs
- EdmScalarPropertyAttribute.cs
- RoutedEventArgs.cs
- PrtTicket_Public.cs
- DocumentReferenceCollection.cs
- Debug.cs
- ConnectionInterfaceCollection.cs
- UnsafeCollabNativeMethods.cs
- ImplicitInputBrush.cs
- WeakReferenceList.cs
- CustomErrorsSectionWrapper.cs
- XmlSchemaComplexType.cs
- TemplateNodeContextMenu.cs
- InvalidEnumArgumentException.cs
- SmtpReplyReaderFactory.cs
- SafeHandle.cs
- DBConnection.cs
- SoapInteropTypes.cs
- SegmentInfo.cs
- ColumnReorderedEventArgs.cs
- Int32CAMarshaler.cs
- ClientConfigurationHost.cs
- RelatedImageListAttribute.cs
- CodeGeneratorOptions.cs
- AnnotationHelper.cs
- MultiPropertyDescriptorGridEntry.cs
- WindowsIdentity.cs
- LayoutManager.cs
- UInt32.cs
- BaseServiceProvider.cs
- Visitors.cs
- ListViewItemSelectionChangedEvent.cs
- PerformanceCounterCategory.cs
- CodeAssignStatement.cs
- ResourceDictionary.cs
- IResourceProvider.cs