Table of Contents

Class EventMaskExtensions

Namespace
SharpHook.Data
Assembly
SharpHook.dll

Contains extension methods for EventMask.

public static class EventMaskExtensions
Inheritance
EventMaskExtensions
Inherited Members

Methods

HasAll(EventMask, EventMask)

Returns true if the event mask contains all of the specified flags. Otherwise, returns false.

public static bool HasAll(this EventMask mask, EventMask flagsToCheck)

Parameters

mask EventMask
flagsToCheck EventMask

The mask flags to check against.

Returns

bool

true if the event mask contains all of the specified flags. Otherwise, false.

Remarks

This method returns true if flagsToCheck equals None.

HasAlt(EventMask)

Returns true if the event mask contains either LeftAlt or RightAlt. Otherwise, returns false.

public static bool HasAlt(this EventMask mask)

Parameters

mask EventMask

Returns

bool

true if the event mask contains either LeftAlt or RightAlt. Otherwise, false.

HasAny(EventMask, EventMask)

Returns true if the event mask contains any of the specified flags. Otherwise, returns false.

public static bool HasAny(this EventMask mask, EventMask flagsToCheck)

Parameters

mask EventMask
flagsToCheck EventMask

The mask flags to check against.

Returns

bool

true if the event mask contains any of the specified flags. Otherwise, false.

Remarks

This method returns false if flagsToCheck equals None.

HasCtrl(EventMask)

Returns true if the event mask contains either LeftCtrl or RightCtrl. Otherwise, returns false.

public static bool HasCtrl(this EventMask mask)

Parameters

mask EventMask

Returns

bool

true if the event mask contains either LeftCtrl or RightCtrl. Otherwise, false.

HasMeta(EventMask)

Returns true if the event mask contains either LeftMeta or RightMeta. Otherwise, returns false.

public static bool HasMeta(this EventMask mask)

Parameters

mask EventMask

Returns

bool

true if the event mask contains either LeftMeta or RightMeta. Otherwise, false.

HasShift(EventMask)

Returns true if the event mask contains either LeftShift or RightShift. Otherwise, returns false.

public static bool HasShift(this EventMask mask)

Parameters

mask EventMask

Returns

bool

true if the event mask contains either LeftShift or RightShift. Otherwise, false.

Merge(EventMask[])

Merges an array of event mask flags into a single event mask.

public static EventMask Merge(this EventMask[] flags)

Parameters

flags EventMask[]

Returns

EventMask

An event mask which contains the specified mask flags.

Exceptions

ArgumentNullException

The flags array is null.

Split(EventMask)

Splits an event mask into an array of individual flags.

public static EventMask[] Split(this EventMask mask)

Parameters

mask EventMask

Returns

EventMask[]

An array of individual flags contained in the mask, or an empty array if the mask is None.