Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / WinFormsIntegration / System / Windows / Integration / PropertyMappingExceptionEventArgs.cs / 1 / PropertyMappingExceptionEventArgs.cs
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace System.Windows.Forms.Integration
{
///
/// Enables the user to see the property that threw an exception, and to preview or cancel the exception.
///
public class PropertyMappingExceptionEventArgs : IntegrationExceptionEventArgs
{
private string _propertyName;
private object _propertyValue;
///
/// Initializes a new instance of the PropertyMappingExceptionEventArgs class.
///
public PropertyMappingExceptionEventArgs(Exception exception, string propertyName, object propertyValue)
: base(false, exception)
{
if (exception == null)
{
throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.Get(SRID.WFI_NullArgument), "exception"));
}
if (string.IsNullOrEmpty(propertyName))
{
throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.Get(SRID.WFI_ArgumentNullOrEmpty), "propertyName"));
}
_propertyName = propertyName;
_propertyValue = propertyValue;
}
///
/// Identifies the property that was being mapped when the exception occurred.
///
public string PropertyName
{
get
{
return _propertyName;
}
}
///
/// Specifies the value of the property that was being mapped when the exception occurred.
///
public object PropertyValue
{
get
{
return _propertyValue;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace System.Windows.Forms.Integration
{
///
/// Enables the user to see the property that threw an exception, and to preview or cancel the exception.
///
public class PropertyMappingExceptionEventArgs : IntegrationExceptionEventArgs
{
private string _propertyName;
private object _propertyValue;
///
/// Initializes a new instance of the PropertyMappingExceptionEventArgs class.
///
public PropertyMappingExceptionEventArgs(Exception exception, string propertyName, object propertyValue)
: base(false, exception)
{
if (exception == null)
{
throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.Get(SRID.WFI_NullArgument), "exception"));
}
if (string.IsNullOrEmpty(propertyName))
{
throw new ArgumentNullException(string.Format(CultureInfo.CurrentCulture, SR.Get(SRID.WFI_ArgumentNullOrEmpty), "propertyName"));
}
_propertyName = propertyName;
_propertyValue = propertyValue;
}
///
/// Identifies the property that was being mapped when the exception occurred.
///
public string PropertyName
{
get
{
return _propertyName;
}
}
///
/// Specifies the value of the property that was being mapped when the exception occurred.
///
public object PropertyValue
{
get
{
return _propertyValue;
}
}
}
}
// 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
- RoutedCommand.cs
- XmlAttributeCollection.cs
- WizardForm.cs
- HttpServerVarsCollection.cs
- OracleBFile.cs
- ZipPackagePart.cs
- EventProviderWriter.cs
- Pair.cs
- SmiRecordBuffer.cs
- SafeFileMapViewHandle.cs
- PictureBox.cs
- CommandLibraryHelper.cs
- FunctionQuery.cs
- X509ChainElement.cs
- ValueProviderWrapper.cs
- httpstaticobjectscollection.cs
- TextFormatterHost.cs
- FixUp.cs
- FontFamilyConverter.cs
- NullableFloatMinMaxAggregationOperator.cs
- Transform.cs
- WebPartExportVerb.cs
- FieldNameLookup.cs
- DynamicPropertyHolder.cs
- SchemaImporter.cs
- IpcChannelHelper.cs
- SmiRecordBuffer.cs
- DataGridViewCellStyleChangedEventArgs.cs
- CodeTypeParameterCollection.cs
- TransportSecurityBindingElement.cs
- ObjectNavigationPropertyMapping.cs
- DiscoveryDefaults.cs
- CqlLexer.cs
- CustomTokenProvider.cs
- QuaternionKeyFrameCollection.cs
- MediaScriptCommandRoutedEventArgs.cs
- Constraint.cs
- ToggleButton.cs
- BrowserCapabilitiesFactory.cs
- DataViewSetting.cs
- SQLDateTime.cs
- ItemCollection.cs
- XhtmlBasicSelectionListAdapter.cs
- XmlWriterDelegator.cs
- _OSSOCK.cs
- EditorZone.cs
- ProcessHost.cs
- CodeGeneratorOptions.cs
- ConsoleKeyInfo.cs
- CaseStatement.cs
- HttpRawResponse.cs
- HandlerBase.cs
- QuaternionValueSerializer.cs
- ObjectAnimationUsingKeyFrames.cs
- SimpleMailWebEventProvider.cs
- RegexMatchCollection.cs
- DataViewListener.cs
- ProcessDesigner.cs
- InArgumentConverter.cs
- ImportCatalogPart.cs
- WebPartActionVerb.cs
- InstanceKeyNotReadyException.cs
- SessionStateSection.cs
- Int32.cs
- ViewPort3D.cs
- IndexerNameAttribute.cs
- ModifiableIteratorCollection.cs
- ManagementClass.cs
- ListControlBoundActionList.cs
- ToggleButtonAutomationPeer.cs
- WebPart.cs
- SqlDataSourceCommandEventArgs.cs
- DataTemplateKey.cs
- Identifier.cs
- Speller.cs
- UnsafeNativeMethodsTablet.cs
- LocalizedNameDescriptionPair.cs
- ConditionedDesigner.cs
- URLString.cs
- SchemaEntity.cs
- LinkUtilities.cs
- NameTable.cs
- StatusBarItemAutomationPeer.cs
- DataControlField.cs
- TokenBasedSet.cs
- SvcMapFile.cs
- Completion.cs
- __FastResourceComparer.cs
- PopupRoot.cs
- RoleGroupCollection.cs
- Label.cs
- DataIdProcessor.cs
- objectquery_tresulttype.cs
- EntityCommand.cs
- CqlErrorHelper.cs
- StyleSelector.cs
- TextModifier.cs
- SimpleTextLine.cs
- Condition.cs
- BitmapDecoder.cs