C# Class InternalHelper.TextLibraryCount

Utilities used by TextPattern testing both within UIA Verify and without
Show file Open project: geeksree/cSharpGeeks Class Usage Examples

Public Methods

Method Description
CastNativeWindowHandleToIntPtr ( AutomationElement element ) : IntPtr

Gets WindowHandle from an AutomationElement

IdentifySupportedTextUnits ( AutomationElement element, TextUnit &supportedTextUnits ) : void

Identifies supported text units. Some units will map upwards TextUnit.Page, for example, maps up to a Document for all controls/providers except Word/Office Win32: By control Avalon: TBD Trident: TBD Office: TBD

IsCriticalException ( Exception exception ) : bool

Checks for critical nonrecoverable errors

IsRichEdit ( AutomationElement autoElement ) : bool

Identify if we're on RichEdit control or not

ValidateArgumentNonNull ( object obj, string argName ) : void
Win32CountLines ( AutomationElement element ) : int

Private Methods

Method Description
CountParagraphs ( string actualText ) : int
CountTextUnit ( TextUnit tu, TextPatternRange rangeToCount ) : int
CountTextUnitsInRange ( TextPatternRange rangeToCount, TextUnit supportedTextUnits, int &numberOfTextUnits ) : void
GetClassName ( AutomationElement autoElement ) : string
GetClassName ( AutomationElement autoElement, string &className, string &localizedControlType ) : void
IsTrailingCRLF ( AutomationElement autoElement, string text ) : uint
SetProvider ( string _typeOfProvider ) : void
Win32CountTextUnit ( TextUnit textUnit, TextPatternRange rangeToCount ) : int
win32_IdentifySupportedTextUnits ( AutomationElement element, TextUnit targetUnit ) : TextUnit
wpf_IdentifySupportedTextUnits ( AutomationElement element, TextUnit targetUnit ) : TextUnit

Method Details

CastNativeWindowHandleToIntPtr() public static method

Gets WindowHandle from an AutomationElement
public static CastNativeWindowHandleToIntPtr ( AutomationElement element ) : IntPtr
element System.Windows.Automation.AutomationElement
return System.IntPtr

IdentifySupportedTextUnits() public static method

Identifies supported text units. Some units will map upwards TextUnit.Page, for example, maps up to a Document for all controls/providers except Word/Office Win32: By control Avalon: TBD Trident: TBD Office: TBD
public static IdentifySupportedTextUnits ( AutomationElement element, TextUnit &supportedTextUnits ) : void
element System.Windows.Automation.AutomationElement
supportedTextUnits TextUnit
return void

IsCriticalException() static public method

Checks for critical nonrecoverable errors
static public IsCriticalException ( Exception exception ) : bool
exception System.Exception
return bool

IsRichEdit() public static method

Identify if we're on RichEdit control or not
public static IsRichEdit ( AutomationElement autoElement ) : bool
autoElement System.Windows.Automation.AutomationElement
return bool

ValidateArgumentNonNull() static public method

static public ValidateArgumentNonNull ( object obj, string argName ) : void
obj object
argName string
return void

Win32CountLines() public static method

public static Win32CountLines ( AutomationElement element ) : int
element System.Windows.Automation.AutomationElement
return int