Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ItemsPanelTemplate.cs
- WSHttpSecurity.cs
- SplitterDesigner.cs
- ConfigurationProviderException.cs
- HtmlToClrEventProxy.cs
- TreeIterator.cs
- HotSpotCollection.cs
- HostElement.cs
- DynamicILGenerator.cs
- UriPrefixTable.cs
- ManagedIStream.cs
- CacheMode.cs
- FindCriteria.cs
- PageContentCollection.cs
- JsonWriter.cs
- ListParaClient.cs
- TypeListConverter.cs
- IsolatedStorageException.cs
- ParseHttpDate.cs
- PrtCap_Builder.cs
- CreateUserWizard.cs
- WebPartAddingEventArgs.cs
- WaitHandleCannotBeOpenedException.cs
- ValueUnavailableException.cs
- CollectionChangedEventManager.cs
- HtmlDocument.cs
- TailCallAnalyzer.cs
- DashStyles.cs
- BooleanKeyFrameCollection.cs
- ClientSession.cs
- SimpleBitVector32.cs
- BamlTreeUpdater.cs
- ObjectConverter.cs
- EntityDataSourceSelectedEventArgs.cs
- PartBasedPackageProperties.cs
- GeometryDrawing.cs
- HMACSHA256.cs
- LinqDataSourceUpdateEventArgs.cs
- ConditionValidator.cs
- DoWhileDesigner.xaml.cs
- AdvancedBindingEditor.cs
- PageHandlerFactory.cs
- ContextMenuService.cs
- CachedFontFace.cs
- AttributeUsageAttribute.cs
- EntityCommandDefinition.cs
- ClientData.cs
- RoutedEventArgs.cs
- ClientSponsor.cs
- CodeTypeReferenceExpression.cs
- LayoutSettings.cs
- ContainerAction.cs
- OdbcParameterCollection.cs
- TransportSecurityHelpers.cs
- AssemblyCollection.cs
- DataGridViewCheckBoxColumn.cs
- DBConnection.cs
- _UriTypeConverter.cs
- RouteParametersHelper.cs
- AnimationLayer.cs
- SqlBuilder.cs
- PrtCap_Public_Simple.cs
- ItemCollection.cs
- FormViewPagerRow.cs
- MethodRental.cs
- ContextMenu.cs
- FlowLayout.cs
- PrintController.cs
- UIHelper.cs
- PropertyEmitter.cs
- DocumentXPathNavigator.cs
- shaperfactoryquerycacheentry.cs
- WebSysDefaultValueAttribute.cs
- RenderCapability.cs
- ReadOnlyDictionary.cs
- SyndicationItemFormatter.cs
- ConnectionConsumerAttribute.cs
- BlockingCollection.cs
- HtmlValidatorAdapter.cs
- CngKeyBlobFormat.cs
- RotateTransform3D.cs
- URLString.cs
- CacheDependency.cs
- DataColumnCollection.cs
- RubberbandSelector.cs
- InkCanvas.cs
- OleDbDataAdapter.cs
- FileDialogPermission.cs
- FieldAccessException.cs
- XmlSchemaComplexContent.cs
- BasicViewGenerator.cs
- SmtpMail.cs
- UserNameSecurityTokenProvider.cs
- RegistrationServices.cs
- ConfigurationStrings.cs
- VirtualizingPanel.cs
- MatrixCamera.cs
- SpAudioStreamWrapper.cs
- SwitchAttribute.cs
- SqlTriggerContext.cs