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
- ClientEndpointLoader.cs
- InvalidComObjectException.cs
- DBCommand.cs
- SchemaCollectionPreprocessor.cs
- DBPropSet.cs
- DataGridBeginningEditEventArgs.cs
- BamlMapTable.cs
- TypeContext.cs
- FrameworkContextData.cs
- TableLayoutRowStyleCollection.cs
- ManagementPath.cs
- AutoGeneratedField.cs
- TCPListener.cs
- TextElementEditingBehaviorAttribute.cs
- URLString.cs
- CompositeCollectionView.cs
- CommandConverter.cs
- TdsParserHelperClasses.cs
- ExceptionValidationRule.cs
- TargetParameterCountException.cs
- ReflectionHelper.cs
- COM2Properties.cs
- UiaCoreTypesApi.cs
- DiscriminatorMap.cs
- TdsParser.cs
- WinEventHandler.cs
- ContextConfiguration.cs
- QilIterator.cs
- InternalControlCollection.cs
- SapiRecoInterop.cs
- ContentDisposition.cs
- SpecularMaterial.cs
- ObjectDataSourceChooseTypePanel.cs
- HtmlInputSubmit.cs
- DependencySource.cs
- XhtmlBasicCalendarAdapter.cs
- ParallelTimeline.cs
- InvalidCastException.cs
- UnsafeNativeMethods.cs
- BulletedList.cs
- KeyValueConfigurationElement.cs
- BitmapMetadataEnumerator.cs
- InvokePatternIdentifiers.cs
- XmlAttribute.cs
- AppDomain.cs
- SqlUtil.cs
- ListView.cs
- ISAPIWorkerRequest.cs
- ToolStripProgressBar.cs
- AutoSizeToolBoxItem.cs
- ControlPropertyNameConverter.cs
- IdentityNotMappedException.cs
- HttpFileCollection.cs
- AutomationElementCollection.cs
- RichTextBoxDesigner.cs
- Camera.cs
- SafeArrayRankMismatchException.cs
- StyleHelper.cs
- ProtocolsConfiguration.cs
- FileInfo.cs
- ValidationError.cs
- FragmentQuery.cs
- HttpCapabilitiesSectionHandler.cs
- LOSFormatter.cs
- IndentedTextWriter.cs
- MergablePropertyAttribute.cs
- SessionPageStatePersister.cs
- NavigationProperty.cs
- ControlAdapter.cs
- TemplateParser.cs
- WindowsListViewGroupSubsetLink.cs
- InputReport.cs
- HyperLinkColumn.cs
- TemplateXamlParser.cs
- XPathEmptyIterator.cs
- XmlComment.cs
- DataGridSortCommandEventArgs.cs
- InternalConfigHost.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SystemWebExtensionsSectionGroup.cs
- BinaryConverter.cs
- InvalidCommandTreeException.cs
- DataServiceHostFactory.cs
- UserPreferenceChangedEventArgs.cs
- _NtlmClient.cs
- ByteStack.cs
- FragmentQueryProcessor.cs
- AssemblyCollection.cs
- UxThemeWrapper.cs
- PrintPreviewDialog.cs
- ScrollItemProviderWrapper.cs
- PermissionSetTriple.cs
- TriState.cs
- SafeCoTaskMem.cs
- DataObject.cs
- ClientTargetCollection.cs
- PhotoPrintingIntent.cs
- HiddenFieldPageStatePersister.cs
- CheckBoxRenderer.cs
- EnumUnknown.cs