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
- CheckedListBox.cs
- CalendarDateRangeChangingEventArgs.cs
- TextProperties.cs
- ExpressionDumper.cs
- RoleManagerEventArgs.cs
- RelationalExpressions.cs
- DataServiceQuery.cs
- JsonReader.cs
- DeriveBytes.cs
- NamedObject.cs
- FigureParagraph.cs
- EntityClientCacheEntry.cs
- CharUnicodeInfo.cs
- ResXDataNode.cs
- MethodExpr.cs
- Wizard.cs
- HandlerFactoryWrapper.cs
- KeyGestureConverter.cs
- Misc.cs
- OutputWindow.cs
- TypeTypeConverter.cs
- XmlRawWriter.cs
- DeclaredTypeValidatorAttribute.cs
- CipherData.cs
- TranslateTransform.cs
- FamilyMapCollection.cs
- WebPartDesigner.cs
- PageCodeDomTreeGenerator.cs
- UnhandledExceptionEventArgs.cs
- HorizontalAlignConverter.cs
- __Filters.cs
- DateTimeOffsetConverter.cs
- VisualStateChangedEventArgs.cs
- Point3DKeyFrameCollection.cs
- AppDomainProtocolHandler.cs
- XmlAttributeAttribute.cs
- ParallelSeparator.xaml.cs
- Page.cs
- HtmlInputButton.cs
- SortDescription.cs
- IsolatedStorageFile.cs
- RegionData.cs
- MultiSelectRootGridEntry.cs
- CollectionConverter.cs
- WSIdentityFaultException.cs
- WinEventQueueItem.cs
- CqlLexer.cs
- AnnotationResource.cs
- SoapTypeAttribute.cs
- CFGGrammar.cs
- LineVisual.cs
- CategoriesDocument.cs
- _AcceptOverlappedAsyncResult.cs
- ControllableStoryboardAction.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- XmlDataSourceView.cs
- _ConnectOverlappedAsyncResult.cs
- ExtendedProtectionPolicy.cs
- Oid.cs
- WebBrowserBase.cs
- TreeViewAutomationPeer.cs
- GetPageNumberCompletedEventArgs.cs
- LockCookie.cs
- XsltConvert.cs
- ResolveNameEventArgs.cs
- PanelDesigner.cs
- EventDescriptor.cs
- AliasedExpr.cs
- GridEntry.cs
- BitmapPalette.cs
- GeneralTransformGroup.cs
- SinglePageViewer.cs
- AutoCompleteStringCollection.cs
- XamlWrappingReader.cs
- DetailsViewUpdatedEventArgs.cs
- SectionInput.cs
- SspiHelper.cs
- MenuItemCollection.cs
- TypeForwardedToAttribute.cs
- QilInvoke.cs
- ToolStripContainer.cs
- WebPartPersonalization.cs
- TextLineResult.cs
- SafeLibraryHandle.cs
- RenderCapability.cs
- NullReferenceException.cs
- FontInfo.cs
- TypeDescriptionProvider.cs
- ConfigDefinitionUpdates.cs
- BaseTemplateParser.cs
- CSharpCodeProvider.cs
- InkCanvas.cs
- ThreadStaticAttribute.cs
- RestHandlerFactory.cs
- MoveSizeWinEventHandler.cs
- SqlDuplicator.cs
- InputLanguageCollection.cs
- FactoryGenerator.cs
- ContractBase.cs
- X509Certificate2Collection.cs