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
- ArgIterator.cs
- PageAsyncTask.cs
- CodeParameterDeclarationExpressionCollection.cs
- MultiAsyncResult.cs
- PassportPrincipal.cs
- RepeatBehaviorConverter.cs
- PropertyInformationCollection.cs
- DockPatternIdentifiers.cs
- TraceHandler.cs
- SurrogateSelector.cs
- BamlTreeUpdater.cs
- CounterSet.cs
- InitializationEventAttribute.cs
- MenuEventArgs.cs
- UnicastIPAddressInformationCollection.cs
- XmlUtil.cs
- InputLangChangeEvent.cs
- ProvideValueServiceProvider.cs
- GeneralTransform3DTo2D.cs
- GPRECTF.cs
- DBCommandBuilder.cs
- X509UI.cs
- TouchDevice.cs
- ReadContentAsBinaryHelper.cs
- JavaScriptString.cs
- ControlBuilderAttribute.cs
- TableCellCollection.cs
- HtmlInputSubmit.cs
- TypeValidationEventArgs.cs
- PersianCalendar.cs
- X509CertificateChain.cs
- NameValueFileSectionHandler.cs
- DbCommandTree.cs
- NamedPermissionSet.cs
- Highlights.cs
- QueryExpr.cs
- GPRECT.cs
- ZipIOLocalFileHeader.cs
- Attribute.cs
- TypedTableBaseExtensions.cs
- DragStartedEventArgs.cs
- BaseValidator.cs
- DiscoveryCallbackBehavior.cs
- Component.cs
- SafeNativeMethods.cs
- FileVersionInfo.cs
- VSDExceptions.cs
- ReflectionTypeLoadException.cs
- ImageListImageEditor.cs
- BamlCollectionHolder.cs
- CqlErrorHelper.cs
- CodeComment.cs
- TextServicesContext.cs
- StringFunctions.cs
- CompilerCollection.cs
- ProcessHostFactoryHelper.cs
- TaskFormBase.cs
- ApplicationFileParser.cs
- ContainerAction.cs
- CollectionChangeEventArgs.cs
- SqlCommandSet.cs
- Rfc2898DeriveBytes.cs
- XmlnsDictionary.cs
- Throw.cs
- FieldToken.cs
- EditorAttribute.cs
- DataBindingHandlerAttribute.cs
- MenuAutomationPeer.cs
- ProgramPublisher.cs
- Vector3DCollection.cs
- IsolatedStorageFilePermission.cs
- NetworkStream.cs
- BaseParagraph.cs
- DataGridViewRowPrePaintEventArgs.cs
- MessageHeaderT.cs
- PersonalizationProviderHelper.cs
- BaseParaClient.cs
- OdbcInfoMessageEvent.cs
- UxThemeWrapper.cs
- Underline.cs
- DesignerMetadata.cs
- TraceListeners.cs
- SafeNativeMethods.cs
- SymbolTable.cs
- Visual3DCollection.cs
- WebPartVerb.cs
- DataGridCaption.cs
- BitmapEffectGroup.cs
- HtmlTableCell.cs
- ClientSponsor.cs
- RegexCaptureCollection.cs
- RuntimeResourceSet.cs
- QuerySetOp.cs
- Variable.cs
- SplineKeyFrames.cs
- TextEditorMouse.cs
- EditingCommands.cs
- X509ThumbprintKeyIdentifierClause.cs
- CssTextWriter.cs
- PerspectiveCamera.cs