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
- ClaimComparer.cs
- HtmlInputImage.cs
- DataGridTemplateColumn.cs
- DebugInfo.cs
- PackageDigitalSignatureManager.cs
- ToolTip.cs
- XmlEncApr2001.cs
- DeploymentExceptionMapper.cs
- ISFClipboardData.cs
- CurrencyWrapper.cs
- RawAppCommandInputReport.cs
- _SafeNetHandles.cs
- ThrowHelper.cs
- OdbcHandle.cs
- Package.cs
- CharacterMetricsDictionary.cs
- DESCryptoServiceProvider.cs
- XmlSecureResolver.cs
- PipelineComponent.cs
- AttributeCollection.cs
- ValueSerializer.cs
- filewebrequest.cs
- BoolExpression.cs
- ConstructorArgumentAttribute.cs
- ResourceAttributes.cs
- RowCache.cs
- HwndProxyElementProvider.cs
- BitmapFrameEncode.cs
- UIElementHelper.cs
- BitmapEffectrendercontext.cs
- SafeUserTokenHandle.cs
- SiteMapNodeItemEventArgs.cs
- PageParserFilter.cs
- BinaryConverter.cs
- RequiredFieldValidator.cs
- GridViewColumnCollection.cs
- ViewCellSlot.cs
- DisposableCollectionWrapper.cs
- uribuilder.cs
- TailCallAnalyzer.cs
- ProtocolViolationException.cs
- RtfToXamlLexer.cs
- WpfGeneratedKnownProperties.cs
- CodePrimitiveExpression.cs
- PreloadedPackages.cs
- ServiceHostingEnvironment.cs
- DoubleAnimationUsingKeyFrames.cs
- Baml2006ReaderContext.cs
- ConfigurationPropertyAttribute.cs
- TrackBar.cs
- ListBoxItem.cs
- PropertyChangedEventManager.cs
- SqlGatherConsumedAliases.cs
- DataObjectFieldAttribute.cs
- ShimAsPublicXamlType.cs
- SamlAuthenticationStatement.cs
- GlyphRunDrawing.cs
- RoutedEvent.cs
- EventMappingSettingsCollection.cs
- XsdCachingReader.cs
- DynamicDocumentPaginator.cs
- UInt64.cs
- HtmlInputCheckBox.cs
- Underline.cs
- CapiSafeHandles.cs
- TimelineClockCollection.cs
- SortDescriptionCollection.cs
- ResourcesGenerator.cs
- OracleString.cs
- FixedSOMImage.cs
- mongolianshape.cs
- BroadcastEventHelper.cs
- WebConvert.cs
- oledbmetadatacollectionnames.cs
- TextTrailingCharacterEllipsis.cs
- RightNameExpirationInfoPair.cs
- LinearGradientBrush.cs
- CapabilitiesRule.cs
- XmlDataSourceNodeDescriptor.cs
- TextProperties.cs
- SoapIgnoreAttribute.cs
- CryptoSession.cs
- HtmlShim.cs
- InstanceCollisionException.cs
- ListViewGroupItemCollection.cs
- TaskFactory.cs
- SourceChangedEventArgs.cs
- Rule.cs
- ListItemViewControl.cs
- DataTableCollection.cs
- XmlNamespaceManager.cs
- CompiledAction.cs
- ObjectStateEntry.cs
- NamespaceQuery.cs
- RequiredFieldValidator.cs
- DataBindingExpressionBuilder.cs
- EmptyEnumerable.cs
- DataContractJsonSerializerOperationFormatter.cs
- DataGridLinkButton.cs
- MessageEnumerator.cs