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
- TimeStampChecker.cs
- LogSwitch.cs
- InheritanceContextChangedEventManager.cs
- ZipIOLocalFileHeader.cs
- FilterableAttribute.cs
- DesignerTextBoxAdapter.cs
- brushes.cs
- RectValueSerializer.cs
- ProcessManager.cs
- SspiSecurityToken.cs
- TableParagraph.cs
- KoreanLunisolarCalendar.cs
- ProxyFragment.cs
- ListenerHandler.cs
- WebControlAdapter.cs
- DynamicPropertyHolder.cs
- RSAPKCS1SignatureFormatter.cs
- HandlerWithFactory.cs
- ThreadAttributes.cs
- HashAlgorithm.cs
- OutputCacheProfileCollection.cs
- WebPartTransformer.cs
- RoutedUICommand.cs
- FormViewDeletedEventArgs.cs
- GlyphRunDrawing.cs
- StreamWithDictionary.cs
- DbConnectionClosed.cs
- PropertySourceInfo.cs
- Button.cs
- DocumentReferenceCollection.cs
- DragDropHelper.cs
- QuaternionIndependentAnimationStorage.cs
- DataTableMappingCollection.cs
- NonVisualControlAttribute.cs
- LoadRetryConstantStrategy.cs
- XmlDomTextWriter.cs
- DocumentAutomationPeer.cs
- StaticDataManager.cs
- EncryptedData.cs
- TraceLog.cs
- WizardPanel.cs
- ActiveDocumentEvent.cs
- TextEditorMouse.cs
- WebAdminConfigurationHelper.cs
- _NegoState.cs
- OleDbTransaction.cs
- NameValueCollection.cs
- OdbcConnectionHandle.cs
- HashAlgorithm.cs
- DSASignatureFormatter.cs
- ipaddressinformationcollection.cs
- SiteMapDataSourceView.cs
- CheckBoxStandardAdapter.cs
- ThreadAbortException.cs
- ColumnPropertiesGroup.cs
- SBCSCodePageEncoding.cs
- UpdateTracker.cs
- IssuanceLicense.cs
- RequestCachePolicyConverter.cs
- DecoratedNameAttribute.cs
- TraceListener.cs
- CriticalExceptions.cs
- CatalogPartDesigner.cs
- SingleObjectCollection.cs
- CompleteWizardStep.cs
- PlatformNotSupportedException.cs
- ProjectionPathBuilder.cs
- LinkLabel.cs
- HttpModuleAction.cs
- DataGridViewTextBoxColumn.cs
- SoapMessage.cs
- Attributes.cs
- FilterableAttribute.cs
- PeerResolver.cs
- SendingRequestEventArgs.cs
- VirtualizedCellInfoCollection.cs
- KeyFrames.cs
- MessageSecurityOverMsmq.cs
- SspiNegotiationTokenProvider.cs
- BinaryReader.cs
- ReflectionServiceProvider.cs
- FormatConvertedBitmap.cs
- EntityDataSourceStatementEditor.cs
- AttributeAction.cs
- HebrewCalendar.cs
- DesignTable.cs
- FaultDesigner.cs
- WebHttpBinding.cs
- ElementUtil.cs
- WizardPanel.cs
- RadioButtonStandardAdapter.cs
- XXXOnTypeBuilderInstantiation.cs
- C14NUtil.cs
- QueryStoreStatusRequest.cs
- EventLog.cs
- Encoding.cs
- StylusLogic.cs
- BackoffTimeoutHelper.cs
- GenericAuthenticationEventArgs.cs
- WebServiceResponse.cs