fix: reformat using C# rules
This commit is contained in:
@@ -3,40 +3,36 @@ using System.Collections.Generic;
|
||||
using Telegram.Bot.Types;
|
||||
using TelegramBotBase.Sessions;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
/// <summary>
|
||||
/// Base class for given bot command results
|
||||
/// </summary>
|
||||
public class BotCommandEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for given bot command results
|
||||
/// </summary>
|
||||
public class BotCommandEventArgs : EventArgs
|
||||
public BotCommandEventArgs()
|
||||
{
|
||||
public string Command { get; set; }
|
||||
|
||||
public List<string> Parameters { get; set; }
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public bool Handled { get; set; } = false;
|
||||
|
||||
public Message OriginalMessage { get; set; }
|
||||
|
||||
|
||||
public BotCommandEventArgs()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public BotCommandEventArgs(string command, List<string> parameters, Message message, long deviceId, DeviceSession device)
|
||||
{
|
||||
this.Command = command;
|
||||
this.Parameters = parameters;
|
||||
OriginalMessage = message;
|
||||
this.DeviceId = deviceId;
|
||||
this.Device = device;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public BotCommandEventArgs(string command, List<string> parameters, Message message, long deviceId,
|
||||
DeviceSession device)
|
||||
{
|
||||
Command = command;
|
||||
Parameters = parameters;
|
||||
OriginalMessage = message;
|
||||
DeviceId = deviceId;
|
||||
Device = device;
|
||||
}
|
||||
|
||||
public string Command { get; set; }
|
||||
|
||||
public List<string> Parameters { get; set; }
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public bool Handled { get; set; } = false;
|
||||
|
||||
public Message OriginalMessage { get; set; }
|
||||
}
|
||||
@@ -2,44 +2,41 @@
|
||||
using TelegramBotBase.Controls.Hybrid;
|
||||
using TelegramBotBase.Form;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
/// <summary>
|
||||
/// Button get clicked event
|
||||
/// </summary>
|
||||
public class ButtonClickedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Button get clicked event
|
||||
/// </summary>
|
||||
public class ButtonClickedEventArgs : EventArgs
|
||||
public ButtonClickedEventArgs()
|
||||
{
|
||||
public ButtonBase Button { get; set; }
|
||||
|
||||
public int Index { get; set; }
|
||||
|
||||
public object Tag { get; set; }
|
||||
|
||||
public ButtonRow Row { get; set; }
|
||||
|
||||
|
||||
public ButtonClickedEventArgs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ButtonClickedEventArgs(ButtonBase button)
|
||||
{
|
||||
Button = button;
|
||||
Index = -1;
|
||||
}
|
||||
|
||||
public ButtonClickedEventArgs(ButtonBase button, int index)
|
||||
{
|
||||
Button = button;
|
||||
this.Index = index;
|
||||
}
|
||||
|
||||
public ButtonClickedEventArgs(ButtonBase button, int index, ButtonRow row)
|
||||
{
|
||||
Button = button;
|
||||
this.Index = index;
|
||||
Row = row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ButtonClickedEventArgs(ButtonBase button)
|
||||
{
|
||||
Button = button;
|
||||
Index = -1;
|
||||
}
|
||||
|
||||
public ButtonClickedEventArgs(ButtonBase button, int index)
|
||||
{
|
||||
Button = button;
|
||||
Index = index;
|
||||
}
|
||||
|
||||
public ButtonClickedEventArgs(ButtonBase button, int index, ButtonRow row)
|
||||
{
|
||||
Button = button;
|
||||
Index = index;
|
||||
Row = row;
|
||||
}
|
||||
|
||||
public ButtonBase Button { get; set; }
|
||||
|
||||
public int Index { get; set; }
|
||||
|
||||
public object Tag { get; set; }
|
||||
|
||||
public ButtonRow Row { get; set; }
|
||||
}
|
||||
@@ -1,41 +1,36 @@
|
||||
using System;
|
||||
using TelegramBotBase.Controls.Hybrid;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class CheckedChangedEventArgs : EventArgs
|
||||
{
|
||||
public class CheckedChangedEventArgs : EventArgs
|
||||
public CheckedChangedEventArgs()
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the index of the row where the button is inside.
|
||||
/// Contains -1 when it is a layout button or not found.
|
||||
/// </summary>
|
||||
public int Index { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Contains all buttons within this row, excluding the checkbox.
|
||||
/// </summary>
|
||||
public ButtonRow Row { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Contains the new checked status of the row.
|
||||
/// </summary>
|
||||
public bool Checked { get; set; }
|
||||
|
||||
|
||||
public CheckedChangedEventArgs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CheckedChangedEventArgs(ButtonRow row, int index, bool @checked)
|
||||
{
|
||||
Row = row;
|
||||
this.Index = index;
|
||||
this.Checked = @checked;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public CheckedChangedEventArgs(ButtonRow row, int index, bool @checked)
|
||||
{
|
||||
Row = row;
|
||||
Index = index;
|
||||
Checked = @checked;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Contains the index of the row where the button is inside.
|
||||
/// Contains -1 when it is a layout button or not found.
|
||||
/// </summary>
|
||||
public int Index { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Contains all buttons within this row, excluding the checkbox.
|
||||
/// </summary>
|
||||
public ButtonRow Row { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Contains the new checked status of the row.
|
||||
/// </summary>
|
||||
public bool Checked { get; set; }
|
||||
}
|
||||
@@ -2,21 +2,17 @@
|
||||
using Telegram.Bot.Types.Enums;
|
||||
using TelegramBotBase.Base;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class GroupChangedEventArgs : EventArgs
|
||||
{
|
||||
public class GroupChangedEventArgs : EventArgs
|
||||
public GroupChangedEventArgs(MessageType type, MessageResult message)
|
||||
{
|
||||
public MessageType Type { get; set; }
|
||||
|
||||
public MessageResult OriginalMessage { get; set; }
|
||||
|
||||
public GroupChangedEventArgs(MessageType type, MessageResult message)
|
||||
{
|
||||
Type = type;
|
||||
OriginalMessage = message;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Type = type;
|
||||
OriginalMessage = message;
|
||||
}
|
||||
}
|
||||
|
||||
public MessageType Type { get; set; }
|
||||
|
||||
public MessageResult OriginalMessage { get; set; }
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
{
|
||||
public class InitEventArgs : EventArgs
|
||||
{
|
||||
public object[] Args { get; set; }
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public InitEventArgs(params object[] args)
|
||||
{
|
||||
Args = args;
|
||||
}
|
||||
public class InitEventArgs : EventArgs
|
||||
{
|
||||
public InitEventArgs(params object[] args)
|
||||
{
|
||||
Args = args;
|
||||
}
|
||||
}
|
||||
|
||||
public object[] Args { get; set; }
|
||||
}
|
||||
@@ -1,55 +1,59 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class LoadStateEventArgs
|
||||
{
|
||||
public class LoadStateEventArgs
|
||||
public LoadStateEventArgs()
|
||||
{
|
||||
public Dictionary<string,object> Values { get; set; }
|
||||
|
||||
public LoadStateEventArgs()
|
||||
{
|
||||
Values = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
public List<string> Keys => Values.Keys.ToList();
|
||||
|
||||
public string Get(string key)
|
||||
{
|
||||
return Values[key].ToString();
|
||||
}
|
||||
|
||||
public int GetInt(string key)
|
||||
{
|
||||
var i = 0;
|
||||
if (int.TryParse(Values[key].ToString(), out i))
|
||||
return i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public double GetDouble(string key)
|
||||
{
|
||||
double d = 0;
|
||||
if (double.TryParse(Values[key].ToString(), out d))
|
||||
return d;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public bool GetBool(string key)
|
||||
{
|
||||
var b = false;
|
||||
if (bool.TryParse(Values[key].ToString(), out b))
|
||||
return b;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public object GetObject(string key)
|
||||
{
|
||||
return Values[key];
|
||||
}
|
||||
|
||||
Values = new Dictionary<string, object>();
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Values { get; set; }
|
||||
|
||||
public List<string> Keys => Values.Keys.ToList();
|
||||
|
||||
public string Get(string key)
|
||||
{
|
||||
return Values[key].ToString();
|
||||
}
|
||||
|
||||
public int GetInt(string key)
|
||||
{
|
||||
var i = 0;
|
||||
if (int.TryParse(Values[key].ToString(), out i))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public double GetDouble(string key)
|
||||
{
|
||||
double d = 0;
|
||||
if (double.TryParse(Values[key].ToString(), out d))
|
||||
{
|
||||
return d;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public bool GetBool(string key)
|
||||
{
|
||||
var b = false;
|
||||
if (bool.TryParse(Values[key].ToString(), out b))
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public object GetObject(string key)
|
||||
{
|
||||
return Values[key];
|
||||
}
|
||||
}
|
||||
@@ -5,32 +5,25 @@ using Telegram.Bot.Types;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
using TelegramBotBase.Base;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class MemberChangeEventArgs : EventArgs
|
||||
{
|
||||
public class MemberChangeEventArgs : EventArgs
|
||||
public MemberChangeEventArgs()
|
||||
{
|
||||
public List<User> Members { get; set; }
|
||||
|
||||
public MessageType Type { get; set; }
|
||||
|
||||
public MessageResult Result { get; set; }
|
||||
|
||||
public MemberChangeEventArgs()
|
||||
{
|
||||
Members = new List<User>();
|
||||
|
||||
}
|
||||
|
||||
public MemberChangeEventArgs(MessageType type, MessageResult result, params User[] members)
|
||||
{
|
||||
Type = type;
|
||||
Result = result;
|
||||
Members = members.ToList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Members = new List<User>();
|
||||
}
|
||||
}
|
||||
|
||||
public MemberChangeEventArgs(MessageType type, MessageResult result, params User[] members)
|
||||
{
|
||||
Type = type;
|
||||
Result = result;
|
||||
Members = members.ToList();
|
||||
}
|
||||
|
||||
public List<User> Members { get; set; }
|
||||
|
||||
public MessageType Type { get; set; }
|
||||
|
||||
public MessageResult Result { get; set; }
|
||||
}
|
||||
@@ -1,16 +1,11 @@
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class MessageDeletedEventArgs
|
||||
{
|
||||
public class MessageDeletedEventArgs
|
||||
public MessageDeletedEventArgs(int messageId)
|
||||
{
|
||||
public int MessageId
|
||||
{
|
||||
get;set;
|
||||
}
|
||||
|
||||
public MessageDeletedEventArgs(int messageId)
|
||||
{
|
||||
MessageId = messageId;
|
||||
}
|
||||
|
||||
MessageId = messageId;
|
||||
}
|
||||
}
|
||||
|
||||
public int MessageId { get; set; }
|
||||
}
|
||||
@@ -1,26 +1,20 @@
|
||||
using System;
|
||||
using TelegramBotBase.Sessions;
|
||||
|
||||
namespace TelegramBotBase.Base
|
||||
namespace TelegramBotBase.Base;
|
||||
|
||||
public class MessageIncomeEventArgs : EventArgs
|
||||
{
|
||||
public class MessageIncomeEventArgs : EventArgs
|
||||
public MessageIncomeEventArgs(long deviceId, DeviceSession device, MessageResult message)
|
||||
{
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public MessageResult Message { get; set; }
|
||||
|
||||
public MessageIncomeEventArgs(long deviceId, DeviceSession device, MessageResult message)
|
||||
{
|
||||
this.DeviceId = deviceId;
|
||||
this.Device = device;
|
||||
Message = message;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DeviceId = deviceId;
|
||||
Device = device;
|
||||
Message = message;
|
||||
}
|
||||
}
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public MessageResult Message { get; set; }
|
||||
}
|
||||
@@ -1,17 +1,15 @@
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class MessageReceivedEventArgs
|
||||
{
|
||||
public class MessageReceivedEventArgs
|
||||
public MessageReceivedEventArgs(Message m)
|
||||
{
|
||||
public int MessageId => Message.MessageId;
|
||||
|
||||
public Message Message { get; set; }
|
||||
|
||||
public MessageReceivedEventArgs(Message m)
|
||||
{
|
||||
Message = m;
|
||||
}
|
||||
|
||||
Message = m;
|
||||
}
|
||||
}
|
||||
|
||||
public int MessageId => Message.MessageId;
|
||||
|
||||
public Message Message { get; set; }
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
using System;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class MessageSentEventArgs : EventArgs
|
||||
{
|
||||
public class MessageSentEventArgs : EventArgs
|
||||
public MessageSentEventArgs(Message message, Type origin)
|
||||
{
|
||||
public int MessageId => Message.MessageId;
|
||||
|
||||
public Message Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the element, which has called the method.
|
||||
/// </summary>
|
||||
public Type Origin { get; set; }
|
||||
|
||||
|
||||
public MessageSentEventArgs(Message message, Type origin)
|
||||
{
|
||||
Message = message;
|
||||
this.Origin = origin;
|
||||
}
|
||||
|
||||
|
||||
Message = message;
|
||||
Origin = origin;
|
||||
}
|
||||
}
|
||||
|
||||
public int MessageId => Message.MessageId;
|
||||
|
||||
public Message Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the element, which has called the method.
|
||||
/// </summary>
|
||||
public Type Origin { get; set; }
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class PromptDialogCompletedEventArgs
|
||||
{
|
||||
public class PromptDialogCompletedEventArgs
|
||||
{
|
||||
public object Tag { get; set; }
|
||||
public object Tag { get; set; }
|
||||
|
||||
public string Value { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
public string Value { get; set; }
|
||||
}
|
||||
@@ -1,18 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class RenderViewEventArgs : EventArgs
|
||||
{
|
||||
public class RenderViewEventArgs : EventArgs
|
||||
public RenderViewEventArgs(int viewIndex)
|
||||
{
|
||||
public int CurrentView { get; set; }
|
||||
|
||||
|
||||
public RenderViewEventArgs(int viewIndex)
|
||||
{
|
||||
|
||||
CurrentView = viewIndex;
|
||||
}
|
||||
|
||||
|
||||
CurrentView = viewIndex;
|
||||
}
|
||||
}
|
||||
|
||||
public int CurrentView { get; set; }
|
||||
}
|
||||
@@ -1,39 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class SaveStateEventArgs
|
||||
{
|
||||
public class SaveStateEventArgs
|
||||
public SaveStateEventArgs()
|
||||
{
|
||||
public Dictionary<string, object> Values { get; set; }
|
||||
|
||||
public SaveStateEventArgs()
|
||||
{
|
||||
Values = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
public void Set(string key, string value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
public void SetInt(string key, int value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
public void SetBool(string key, bool value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
public void SetDouble(string key, double value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
public void SetObject(string key, object value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
Values = new Dictionary<string, object>();
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> Values { get; set; }
|
||||
|
||||
public void Set(string key, string value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
public void SetInt(string key, int value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
public void SetBool(string key, bool value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
public void SetDouble(string key, double value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
|
||||
public void SetObject(string key, object value)
|
||||
{
|
||||
Values[key] = value;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,13 @@
|
||||
using TelegramBotBase.Base;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class SaveStatesEventArgs
|
||||
{
|
||||
public class SaveStatesEventArgs
|
||||
public SaveStatesEventArgs(StateContainer states)
|
||||
{
|
||||
public StateContainer States { get; set; }
|
||||
|
||||
|
||||
public SaveStatesEventArgs(StateContainer states)
|
||||
{
|
||||
States = states;
|
||||
}
|
||||
States = states;
|
||||
}
|
||||
}
|
||||
|
||||
public StateContainer States { get; set; }
|
||||
}
|
||||
@@ -1,18 +1,17 @@
|
||||
using System;
|
||||
using TelegramBotBase.Sessions;
|
||||
|
||||
namespace TelegramBotBase.Base
|
||||
namespace TelegramBotBase.Base;
|
||||
|
||||
public class SessionBeginEventArgs : EventArgs
|
||||
{
|
||||
public class SessionBeginEventArgs : EventArgs
|
||||
public SessionBeginEventArgs(long deviceId, DeviceSession device)
|
||||
{
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public SessionBeginEventArgs(long deviceId, DeviceSession device)
|
||||
{
|
||||
this.DeviceId = deviceId;
|
||||
this.Device = device;
|
||||
}
|
||||
DeviceId = deviceId;
|
||||
Device = device;
|
||||
}
|
||||
}
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
}
|
||||
@@ -1,32 +1,27 @@
|
||||
using System;
|
||||
using TelegramBotBase.Sessions;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class SystemExceptionEventArgs : EventArgs
|
||||
{
|
||||
public class SystemExceptionEventArgs : EventArgs
|
||||
public SystemExceptionEventArgs()
|
||||
{
|
||||
|
||||
public string Command { get; set; }
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public Exception Error { get; set; }
|
||||
|
||||
public SystemExceptionEventArgs()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public SystemExceptionEventArgs(string command, long deviceId, DeviceSession device, Exception error)
|
||||
{
|
||||
this.Command = command;
|
||||
this.DeviceId = deviceId;
|
||||
this.Device = device;
|
||||
Error = error;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public SystemExceptionEventArgs(string command, long deviceId, DeviceSession device, Exception error)
|
||||
{
|
||||
Command = command;
|
||||
DeviceId = deviceId;
|
||||
Device = device;
|
||||
Error = error;
|
||||
}
|
||||
|
||||
public string Command { get; set; }
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public Exception Error { get; set; }
|
||||
}
|
||||
@@ -2,40 +2,37 @@
|
||||
using Telegram.Bot.Types;
|
||||
using TelegramBotBase.Sessions;
|
||||
|
||||
namespace TelegramBotBase.Args
|
||||
namespace TelegramBotBase.Args;
|
||||
|
||||
public class UnhandledCallEventArgs : EventArgs
|
||||
{
|
||||
public class UnhandledCallEventArgs : EventArgs
|
||||
public UnhandledCallEventArgs()
|
||||
{
|
||||
public string Command { get; set; }
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device {get;set;}
|
||||
|
||||
public string RawData { get; set; }
|
||||
|
||||
public int MessageId { get; set; }
|
||||
|
||||
public Message Message { get; set; }
|
||||
|
||||
public bool Handled { get; set; }
|
||||
|
||||
|
||||
public UnhandledCallEventArgs()
|
||||
{
|
||||
Handled = false;
|
||||
|
||||
}
|
||||
|
||||
public UnhandledCallEventArgs(string command,string rawData, long deviceId, int messageId, Message message, DeviceSession device) : this()
|
||||
{
|
||||
this.Command = command;
|
||||
this.RawData = rawData;
|
||||
this.DeviceId = deviceId;
|
||||
this.MessageId = messageId;
|
||||
Message = message;
|
||||
this.Device = device;
|
||||
}
|
||||
|
||||
Handled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public UnhandledCallEventArgs(string command, string rawData, long deviceId, int messageId, Message message,
|
||||
DeviceSession device) : this()
|
||||
{
|
||||
Command = command;
|
||||
RawData = rawData;
|
||||
DeviceId = deviceId;
|
||||
MessageId = messageId;
|
||||
Message = message;
|
||||
Device = device;
|
||||
}
|
||||
|
||||
public string Command { get; set; }
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public string RawData { get; set; }
|
||||
|
||||
public int MessageId { get; set; }
|
||||
|
||||
public Message Message { get; set; }
|
||||
|
||||
public bool Handled { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user