Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / UIAutomationClient / System / Windows / Automation / NotCondition.cs / 1305600 / NotCondition.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description:
//
// History:
// 10/14/2003 : BrendanM - Created
//
//---------------------------------------------------------------------------
using System;
using MS.Internal.Automation;
using System.Windows.Automation;
namespace System.Windows.Automation
{
///
/// Condition that checks whether a pattern is currently present for a LogicalElement
///
#if (INTERNAL_COMPILE)
internal class NotCondition : Condition
#else
public class NotCondition : Condition
#endif
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
///
/// Constructor to create a condition that negates the specified condition
///
/// Condition to negate
public NotCondition( Condition condition )
{
Misc.ValidateArgumentNonNull( condition, "condition" );
_condition = condition;
// DangerousGetHandle() reminds us that the IntPtr we get back could be collected/released/recycled. We're safe here,
// because the Conditions are structured in a tree, with the root one (which gets passed to the Uia API) keeping all
// others - and their associated data - alive. (Recycling isn't an issue as these are immutable classes.)
SetMarshalData(new UiaCoreApi.UiaNotCondition(_condition._safeHandle.DangerousGetHandle()));
}
#endregion Constructors
//------------------------------------------------------
//
// Public Properties
//
//-----------------------------------------------------
#region Public Properties
///
/// Returns the sub condition that this condition is negating.
///
public Condition Condition
{
get
{
return _condition;
}
}
#endregion Public Properties
//------------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
Condition _condition;
#endregion Private Fields
}
}
// 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:
//
// History:
// 10/14/2003 : BrendanM - Created
//
//---------------------------------------------------------------------------
using System;
using MS.Internal.Automation;
using System.Windows.Automation;
namespace System.Windows.Automation
{
///
/// Condition that checks whether a pattern is currently present for a LogicalElement
///
#if (INTERNAL_COMPILE)
internal class NotCondition : Condition
#else
public class NotCondition : Condition
#endif
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
///
/// Constructor to create a condition that negates the specified condition
///
/// Condition to negate
public NotCondition( Condition condition )
{
Misc.ValidateArgumentNonNull( condition, "condition" );
_condition = condition;
// DangerousGetHandle() reminds us that the IntPtr we get back could be collected/released/recycled. We're safe here,
// because the Conditions are structured in a tree, with the root one (which gets passed to the Uia API) keeping all
// others - and their associated data - alive. (Recycling isn't an issue as these are immutable classes.)
SetMarshalData(new UiaCoreApi.UiaNotCondition(_condition._safeHandle.DangerousGetHandle()));
}
#endregion Constructors
//------------------------------------------------------
//
// Public Properties
//
//-----------------------------------------------------
#region Public Properties
///
/// Returns the sub condition that this condition is negating.
///
public Condition Condition
{
get
{
return _condition;
}
}
#endregion Public Properties
//------------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
Condition _condition;
#endregion Private Fields
}
}
// 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
- XmlSchemaDatatype.cs
- XmlILStorageConverter.cs
- ScalarType.cs
- IInstanceContextProvider.cs
- ConnectionManagementElementCollection.cs
- NotifyParentPropertyAttribute.cs
- CompiledELinqQueryState.cs
- WebCategoryAttribute.cs
- WebPartUtil.cs
- PropertyConverter.cs
- AnimatedTypeHelpers.cs
- HttpProfileGroupBase.cs
- ObjectCacheHost.cs
- PersonalizationStateInfo.cs
- SqlParameterCollection.cs
- BufferModesCollection.cs
- DurationConverter.cs
- Padding.cs
- FrameworkElementAutomationPeer.cs
- CodePrimitiveExpression.cs
- BaseValidatorDesigner.cs
- LexicalChunk.cs
- HttpRequest.cs
- PolicyReader.cs
- TextUtf8RawTextWriter.cs
- RankException.cs
- SqlException.cs
- WhitespaceRuleReader.cs
- SecurityState.cs
- WebBrowserUriTypeConverter.cs
- DataAdapter.cs
- HtmlLink.cs
- HeaderCollection.cs
- StringCollection.cs
- WmlCalendarAdapter.cs
- TagMapCollection.cs
- Container.cs
- ParentQuery.cs
- CommandPlan.cs
- DoubleAnimation.cs
- ConfigXmlWhitespace.cs
- FolderBrowserDialog.cs
- GifBitmapDecoder.cs
- SupportingTokenBindingElement.cs
- WorkflowTransactionOptions.cs
- AttributeUsageAttribute.cs
- ParserStreamGeometryContext.cs
- NavigationProperty.cs
- TraceSource.cs
- CancelEventArgs.cs
- ArrayList.cs
- ArrayElementGridEntry.cs
- Point4D.cs
- StringOutput.cs
- _ChunkParse.cs
- AuthStoreRoleProvider.cs
- ResourceReader.cs
- CodeAttributeArgument.cs
- _MultipleConnectAsync.cs
- WorkBatch.cs
- XmlFormatExtensionPointAttribute.cs
- FullTextLine.cs
- ViewCellRelation.cs
- XamlUtilities.cs
- PathGeometry.cs
- BindingBase.cs
- RuleRefElement.cs
- SrgsRule.cs
- DataSvcMapFileSerializer.cs
- CursorInteropHelper.cs
- TrackingProvider.cs
- HotSpotCollection.cs
- HandlerElement.cs
- DataBoundControl.cs
- ScrollEventArgs.cs
- BuilderInfo.cs
- RootBrowserWindowProxy.cs
- TableAdapterManagerGenerator.cs
- OpacityConverter.cs
- TemplateBamlTreeBuilder.cs
- PropertyDescriptor.cs
- PartitionedDataSource.cs
- ObjectQueryExecutionPlan.cs
- ErrorEventArgs.cs
- ConnectionConsumerAttribute.cs
- Merger.cs
- DecimalConstantAttribute.cs
- QueryContinueDragEvent.cs
- TimeStampChecker.cs
- ExternalCalls.cs
- SplayTreeNode.cs
- SessionStateItemCollection.cs
- MessageTransmitTraceRecord.cs
- WorkerRequest.cs
- SuppressMessageAttribute.cs
- Setter.cs
- FrameworkElement.cs
- SapiGrammar.cs
- DataObject.cs
- TableCell.cs