SampleSmart 1.0.0.0
SampleSmart 사용 방법을 보여 주는 예제 프로젝트입니다.
로딩중...
검색중...
일치하는것 없음
RabbitMqTestView.xaml.ViewModel.cs
이 파일의 문서화 페이지로 가기
1using Dreamine.MVVM.Attributes;
2using Dreamine.MVVM.ViewModels;
3using Microsoft.Extensions.Logging;
4
6
15public partial class RabbitMqTestViewModel : ViewModelBase
16{
25 [DreamineEvent]
27
36 public string Host
37 {
38 get => Event.Host;
39 set
40 {
41 if (Event.Host == value)
42 {
43 return;
44 }
45
46 Event.Host = value;
47 OnPropertyChanged(nameof(Host));
48 OnPropertyChanged(nameof(RabbitMqSelectionSummary));
49 }
50 }
51
60 public int Port
61 {
62 get => Event.Port;
63 set
64 {
65 if (Event.Port == value)
66 {
67 return;
68 }
69
70 Event.Port = value;
71 OnPropertyChanged(nameof(Port));
72 OnPropertyChanged(nameof(RabbitMqSelectionSummary));
73 }
74 }
75
84 public string VirtualHost
85 {
86 get => Event.VirtualHost;
87 set
88 {
89 if (Event.VirtualHost == value)
90 {
91 return;
92 }
93
94 Event.VirtualHost = value;
95 OnPropertyChanged(nameof(VirtualHost));
96 OnPropertyChanged(nameof(RabbitMqSelectionSummary));
97 }
98 }
99
108 public string UserName
109 {
110 get => Event.UserName;
111 set
112 {
113 if (Event.UserName == value)
114 {
115 return;
116 }
117
118 Event.UserName = value;
119 OnPropertyChanged(nameof(UserName));
120 OnPropertyChanged(nameof(RabbitMqSelectionSummary));
121 }
122 }
123
132 public string Password
133 {
134 get => Event.Password;
135 set
136 {
137 if (Event.Password == value)
138 {
139 return;
140 }
141
142 Event.Password = value;
143 OnPropertyChanged(nameof(Password));
144 }
145 }
146
155 public string ExchangeName
156 {
157 get => Event.ExchangeName;
158 set
159 {
160 if (Event.ExchangeName == value)
161 {
162 return;
163 }
164
165 Event.ExchangeName = value;
166 OnPropertyChanged(nameof(ExchangeName));
167 OnPropertyChanged(nameof(RabbitMqSelectionSummary));
168 }
169 }
170
179 public string QueueName
180 {
181 get => Event.QueueName;
182 set
183 {
184 if (Event.QueueName == value)
185 {
186 return;
187 }
188
189 Event.QueueName = value;
190 OnPropertyChanged(nameof(QueueName));
191 OnPropertyChanged(nameof(RabbitMqSelectionSummary));
192 }
193 }
194
203 public string RoutingKey
204 {
205 get => Event.RoutingKey;
206 set
207 {
208 if (Event.RoutingKey == value)
209 {
210 return;
211 }
212
213 Event.RoutingKey = value;
214 OnPropertyChanged(nameof(RoutingKey));
215 OnPropertyChanged(nameof(RabbitMqSelectionSummary));
216 }
217 }
218
227 public string MessageText
228 {
229 get => Event.MessageText;
230 set
231 {
232 if (Event.MessageText == value)
233 {
234 return;
235 }
236
237 Event.MessageText = value;
238 OnPropertyChanged(nameof(MessageText));
239 }
240 }
241
250 public string RabbitMqSelectionSummary => Event.RabbitMqSelectionSummary;
251
260 [DreamineCommand("Event.ConnectRabbitMq")]
261 private partial void ConnectRabbitMq();
262
271 [DreamineCommand("Event.SubscribeRabbitMq")]
272 private partial void SubscribeRabbitMq();
273
282 [DreamineCommand("Event.PublishRabbitMq")]
283 private partial void PublishRabbitMq();
284
293 [DreamineCommand("Event.DisconnectRabbitMq")]
294 private partial void DisconnectRabbitMq();
295
313 {
314 ArgumentNullException.ThrowIfNull(@event);
315
316 _event = @event;
317 }
318}