Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / UIAutomation / UIAutomationTypes / System / Windows / Automation / ElementNotAvailableException.cs / 1 / ElementNotAvailableException.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: Exception indicating that a clickable point could not be found
//
// History:
// 10/23/2003 : BrendanM Ported to WCP
//
//---------------------------------------------------------------------------
using System.Windows.Automation;
using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
using MS.Internal.Automation;
namespace System.Windows.Automation
{
///
/// The exception that is thrown when accesses a AutomationElement or a
/// RawElement that corresponds to UI that is no longer available. This can
/// happen if the UI was in a dialog that was closed, or an application that
/// was closed or terminated.
///
[Serializable]
#if (INTERNAL_COMPILE)
internal class ElementNotAvailableException : SystemException
#else
public class ElementNotAvailableException : SystemException
#endif
{
///
/// Initializes a new instance of the ElementNotAvailableException class.
///
public ElementNotAvailableException() : base(SR.Get(SRID.ElementNotAvailable))
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes an instance of the ElementNotAvailableException class with a specified error message.
///
/// The message that describes the error.
public ElementNotAvailableException(String message) : base(message)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes a new instance of the ElementNotAvailableException class with a specified error message and a reference to the inner exception that is the cause of this exception.
///
/// The message that describes the error.
/// The exception that is the cause of the current exception.
public ElementNotAvailableException(string message, Exception innerException) : base(message, innerException)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes a new instance of the ElementNotAvailableException class with a reference to the inner exception that is the cause of this exception.
///
/// The exception that is the cause of the current exception.
public ElementNotAvailableException(Exception innerException) : base(SR.Get(SRID.ElementNotAvailable), innerException)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes a new instance of the ElementNotAvailableException class with serialized data.
///
//CASRemoval:[SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter=true)]
protected ElementNotAvailableException(SerializationInfo info, StreamingContext context) : base(info, context)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Populates a SerializationInfo with the data needed to serialize the target object.
///
/// The SerializationInfo to populate with data.
/// The destination for this serialization.
[SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter=true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: Exception indicating that a clickable point could not be found
//
// History:
// 10/23/2003 : BrendanM Ported to WCP
//
//---------------------------------------------------------------------------
using System.Windows.Automation;
using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
using MS.Internal.Automation;
namespace System.Windows.Automation
{
///
/// The exception that is thrown when accesses a AutomationElement or a
/// RawElement that corresponds to UI that is no longer available. This can
/// happen if the UI was in a dialog that was closed, or an application that
/// was closed or terminated.
///
[Serializable]
#if (INTERNAL_COMPILE)
internal class ElementNotAvailableException : SystemException
#else
public class ElementNotAvailableException : SystemException
#endif
{
///
/// Initializes a new instance of the ElementNotAvailableException class.
///
public ElementNotAvailableException() : base(SR.Get(SRID.ElementNotAvailable))
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes an instance of the ElementNotAvailableException class with a specified error message.
///
/// The message that describes the error.
public ElementNotAvailableException(String message) : base(message)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes a new instance of the ElementNotAvailableException class with a specified error message and a reference to the inner exception that is the cause of this exception.
///
/// The message that describes the error.
/// The exception that is the cause of the current exception.
public ElementNotAvailableException(string message, Exception innerException) : base(message, innerException)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes a new instance of the ElementNotAvailableException class with a reference to the inner exception that is the cause of this exception.
///
/// The exception that is the cause of the current exception.
public ElementNotAvailableException(Exception innerException) : base(SR.Get(SRID.ElementNotAvailable), innerException)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Initializes a new instance of the ElementNotAvailableException class with serialized data.
///
//CASRemoval:[SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter=true)]
protected ElementNotAvailableException(SerializationInfo info, StreamingContext context) : base(info, context)
{
HResult = UiaCoreTypesApi.UIA_E_ELEMENTNOTAVAILABLE;
}
///
/// Populates a SerializationInfo with the data needed to serialize the target object.
///
/// The SerializationInfo to populate with data.
/// The destination for this serialization.
[SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter=true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
}
}
}
// 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
- XmlSchemaAny.cs
- DataServiceKeyAttribute.cs
- AvtEvent.cs
- PrintingPermissionAttribute.cs
- DuplexSecurityProtocolFactory.cs
- SessionStateContainer.cs
- AdPostCacheSubstitution.cs
- PropertyTabChangedEvent.cs
- DockingAttribute.cs
- TransformPattern.cs
- StateMachine.cs
- ByteStorage.cs
- StoragePropertyMapping.cs
- TagMapCollection.cs
- SessionStateSection.cs
- XmlSerializerSection.cs
- SqlBulkCopyColumnMappingCollection.cs
- ApplicationSecurityInfo.cs
- MultipleViewPatternIdentifiers.cs
- PageAsyncTask.cs
- RoutedEventConverter.cs
- SelectionEditor.cs
- TextBoxAutomationPeer.cs
- WindowShowOrOpenTracker.cs
- streamingZipPartStream.cs
- DocumentViewerHelper.cs
- DateTimeConverter.cs
- ManagedFilter.cs
- DynamicValidatorEventArgs.cs
- CategoryAttribute.cs
- CustomError.cs
- PeerApplicationLaunchInfo.cs
- OperationSelectorBehavior.cs
- XmlArrayItemAttribute.cs
- KnownColorTable.cs
- ListChunk.cs
- _ConnectOverlappedAsyncResult.cs
- SiteMapNodeCollection.cs
- EmissiveMaterial.cs
- AssemblySettingAttributes.cs
- ZipIORawDataFileBlock.cs
- BitmapPalette.cs
- XmlSchemaObjectTable.cs
- SqlCacheDependency.cs
- ConditionalAttribute.cs
- IEnumerable.cs
- PartManifestEntry.cs
- MainMenu.cs
- StrictAndMessageFilter.cs
- KoreanLunisolarCalendar.cs
- HttpFileCollection.cs
- HopperCache.cs
- NumericPagerField.cs
- Mapping.cs
- Int16Converter.cs
- ReflectionPermission.cs
- XmlCodeExporter.cs
- Rules.cs
- UnmanagedMemoryStream.cs
- SymLanguageVendor.cs
- DesignerAdRotatorAdapter.cs
- SessionStateItemCollection.cs
- DBDataPermissionAttribute.cs
- BuildTopDownAttribute.cs
- ToolboxService.cs
- COAUTHINFO.cs
- AutomationElementIdentifiers.cs
- ChildTable.cs
- WebPartConnectionCollection.cs
- BoundsDrawingContextWalker.cs
- Rules.cs
- NativeMethods.cs
- SqlFactory.cs
- CurrencyWrapper.cs
- ListViewGroupItemCollection.cs
- RankException.cs
- BitmapCodecInfo.cs
- XamlReader.cs
- SecurityUtils.cs
- DesignerAdapterUtil.cs
- LiteralTextParser.cs
- ApplicationCommands.cs
- SiteMapDataSource.cs
- clipboard.cs
- OracleCommandSet.cs
- ImageUrlEditor.cs
- TableItemStyle.cs
- PlaceHolder.cs
- UnmanagedHandle.cs
- ObjectViewFactory.cs
- Cursor.cs
- IdentitySection.cs
- CodeIdentifiers.cs
- DataListCommandEventArgs.cs
- AsyncOperation.cs
- SessionStateModule.cs
- DataGridPagerStyle.cs
- TextParaClient.cs
- WSHttpBindingBase.cs
- GPStream.cs