using System;
namespace System
{
/// Describes the console key that was pressed, including the character represented by the console key and the state of the SHIFT, ALT, and CTRL modifier keys.
/// 1
// Token: 0x02000649 RID: 1609
[Serializable]
public struct ConsoleKeyInfo
{
/// Initializes a new instance of the structure using the specified character, console key, and modifier keys.
/// The Unicode character that corresponds to the parameter.
/// The console key that corresponds to the parameter.
/// true to indicate that a SHIFT key was pressed; otherwise, false.
/// true to indicate that an ALT key was pressed; otherwise, false.
/// true to indicate that a CTRL key was pressed; otherwise, false.
/// The numeric value of the parameter is less than 0 or greater than 255.
// Token: 0x06003BB4 RID: 15284 RVA: 0x000CAEA0 File Offset: 0x000C90A0
public ConsoleKeyInfo(char keyChar, ConsoleKey key, bool shift, bool alt, bool control)
{
this.key = key;
this.keychar = keyChar;
this.modifiers = (ConsoleModifiers)0;
this.SetModifiers(shift, alt, control);
}
// Token: 0x06003BB5 RID: 15285 RVA: 0x000CAED0 File Offset: 0x000C90D0
internal ConsoleKeyInfo(ConsoleKeyInfo other)
{
this.key = other.key;
this.keychar = other.keychar;
this.modifiers = other.modifiers;
}
// Token: 0x06003BB7 RID: 15287 RVA: 0x000CAF10 File Offset: 0x000C9110
internal void SetKey(ConsoleKey key)
{
this.key = key;
}
// Token: 0x06003BB8 RID: 15288 RVA: 0x000CAF1C File Offset: 0x000C911C
internal void SetKeyChar(char keyChar)
{
this.keychar = keyChar;
}
// Token: 0x06003BB9 RID: 15289 RVA: 0x000CAF28 File Offset: 0x000C9128
internal void SetModifiers(bool shift, bool alt, bool control)
{
this.modifiers = ((!shift) ? ((ConsoleModifiers)0) : ConsoleModifiers.Shift);
this.modifiers |= ((!alt) ? ((ConsoleModifiers)0) : ConsoleModifiers.Alt);
this.modifiers |= ((!control) ? ((ConsoleModifiers)0) : ConsoleModifiers.Control);
}
/// Gets the console key represented by the current object.
/// A value that identifies the console key that was pressed.
/// 1
// Token: 0x17000B64 RID: 2916
// (get) Token: 0x06003BBA RID: 15290 RVA: 0x000CAF7C File Offset: 0x000C917C
public ConsoleKey Key
{
get
{
return this.key;
}
}
/// Gets the Unicode character represented by the current object.
/// A object that corresponds to the console key represented by the current object.
/// 1
// Token: 0x17000B65 RID: 2917
// (get) Token: 0x06003BBB RID: 15291 RVA: 0x000CAF84 File Offset: 0x000C9184
public char KeyChar
{
get
{
return this.keychar;
}
}
/// Gets a bitwise combination of values that specifies one or more modifier keys pressed simultaneously with the console key.
/// A bitwise combination of values. There is no default value.
/// 1
// Token: 0x17000B66 RID: 2918
// (get) Token: 0x06003BBC RID: 15292 RVA: 0x000CAF8C File Offset: 0x000C918C
public ConsoleModifiers Modifiers
{
get
{
return this.modifiers;
}
}
/// Gets a value indicating whether the specified object is equal to the current object.
/// true if is a object and is equal to the current object; otherwise, false.
/// An object to compare to the current object.
// Token: 0x06003BBD RID: 15293 RVA: 0x000CAF94 File Offset: 0x000C9194
public override bool Equals(object value)
{
return value is ConsoleKeyInfo && this.Equals((ConsoleKeyInfo)value);
}
/// Gets a value indicating whether the specified object is equal to the current object.
/// true if is equal to the current object; otherwise, false.
/// A object to compare to the current object.
// Token: 0x06003BBE RID: 15294 RVA: 0x000CAFB0 File Offset: 0x000C91B0
public bool Equals(ConsoleKeyInfo obj)
{
return this.key == obj.key && obj.keychar == this.keychar && obj.modifiers == this.modifiers;
}
/// Returns the hash code for the current object.
/// A 32-bit signed integer hash code.
// Token: 0x06003BBF RID: 15295 RVA: 0x000CAFF4 File Offset: 0x000C91F4
public override int GetHashCode()
{
return this.key.GetHashCode() ^ this.keychar.GetHashCode() ^ this.modifiers.GetHashCode();
}
/// Indicates whether the specified objects are equal.
/// true if is equal to ; otherwise, false.
/// A object.
/// A object.
// Token: 0x06003BC0 RID: 15296 RVA: 0x000CB030 File Offset: 0x000C9230
public static bool operator ==(ConsoleKeyInfo a, ConsoleKeyInfo b)
{
return a.Equals(b);
}
/// Indicates whether the specified objects are not equal.
/// true if is not equal to ; otherwise, false.
/// A object.
/// A object.
// Token: 0x06003BC1 RID: 15297 RVA: 0x000CB03C File Offset: 0x000C923C
public static bool operator !=(ConsoleKeyInfo a, ConsoleKeyInfo b)
{
return !a.Equals(b);
}
// Token: 0x04001872 RID: 6258
internal static ConsoleKeyInfo Empty = new ConsoleKeyInfo('\0', (ConsoleKey)0, false, false, false);
// Token: 0x04001873 RID: 6259
private ConsoleKey key;
// Token: 0x04001874 RID: 6260
private char keychar;
// Token: 0x04001875 RID: 6261
private ConsoleModifiers modifiers;
}
}