-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMessage.cs
166 lines (143 loc) · 4.59 KB
/
Message.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#region using statements
using System;
using System.Collections.Generic;
using System.Text;
using DataJuggler.Blazor.Components.Interfaces;
#endregion
namespace DataJuggler.Blazor.Components
{
#region class Message
/// <summary>
/// This class is used to send Data between a IBlazorComponent and an IBlazorComponentParent.
/// </summary>
public class Message
{
#region Private Variables
private string text;
private IBlazorComponent sender;
private List<NamedParameter> parameters;
private int id;
private bool checkedValue;
private string keyCode;
#endregion
#region Constructor
/// <summary>
/// Create a new instance of a Message object.
/// </summary>
public Message()
{
// Create the Parameters
this.Parameters = new List<NamedParameter>();
}
#endregion
#region Properties
#region CheckedValue
/// <summary>
/// This property gets or sets the value for 'CheckedValue'.
/// </summary>
public bool CheckedValue
{
get { return checkedValue; }
set { checkedValue = value; }
}
#endregion
#region HasParameters
/// <summary>
/// This property returns true if this object has a 'Parameters'.
/// </summary>
public bool HasParameters
{
get
{
// initial value
bool hasParameters = (this.Parameters != null);
// return value
return hasParameters;
}
}
#endregion
#region HasSender
/// <summary>
/// This property returns true if this object has a 'Sender'.
/// </summary>
public bool HasSender
{
get
{
// initial value
bool hasSender = (this.Sender != null);
// return value
return hasSender;
}
}
#endregion
#region HasText
/// <summary>
/// This property returns true if the 'Text' exists.
/// </summary>
public bool HasText
{
get
{
// initial value
bool hasText = (!String.IsNullOrEmpty(this.Text));
// return value
return hasText;
}
}
#endregion
#region Id
/// <summary>
/// This property gets or sets the value for 'Id'.
/// </summary>
public int Id
{
get { return id; }
set { id = value; }
}
#endregion
#region KeyCode
/// <summary>
/// This property gets or sets the value for 'KeyCode'.
/// </summary>
public string KeyCode
{
get { return keyCode; }
set { keyCode = value; }
}
#endregion
#region Parameters
/// <summary>
/// This property gets or sets the value for 'Parameters'.
/// </summary>
public List<NamedParameter> Parameters
{
get { return parameters; }
set { parameters = value; }
}
#endregion
#region Sender
/// <summary>
/// This property gets or sets the value for 'Sender'.
/// </summary>
public IBlazorComponent Sender
{
get { return sender; }
set { sender = value; }
}
#endregion
#region Text
/// <summary>
/// This property gets or sets the value for 'Text'.
/// </summary>
public string Text
{
get { return text; }
set { text = value; }
}
#endregion
#endregion
}
#endregion
}