markus / ConvertService / ServiceBase / IServiceBase / ConvertItem.cs @ 2decfbdf
이력 | 보기 | 이력해설 | 다운로드 (12.4 KB)
1 |
using System; |
---|---|
2 |
using System.ComponentModel; |
3 |
using System.Runtime.Serialization; |
4 |
using System.Linq.Expressions; |
5 |
using Markus.Message; |
6 |
namespace Markus.Service.Interface |
7 |
{ |
8 |
[DataContract] |
9 |
public class ConvertItem :IEquatable<ConvertItem> ,INotifyPropertyChanged |
10 |
{ |
11 |
public bool Equals(ConvertItem other) |
12 |
{ |
13 |
if (other is null) |
14 |
return false; |
15 |
|
16 |
return this.ConvertID == other.ConvertID && this.ProjectNumber == other.ProjectNumber; |
17 |
} |
18 |
|
19 |
public override bool Equals(object obj) => Equals(obj as ConvertItem); |
20 |
public override int GetHashCode() |
21 |
{ |
22 |
var id = (ConvertID != null) ? ConvertID : ""; |
23 |
var project = (ProjectNumber != null) ? ProjectNumber : ""; |
24 |
|
25 |
return (id + project).GetHashCode(); |
26 |
} |
27 |
|
28 |
public ConvertItem() |
29 |
{ |
30 |
|
31 |
} |
32 |
|
33 |
public ConvertItem(string ProjectNo, string ID) |
34 |
{ |
35 |
this._projectNumber = ProjectNo; |
36 |
this._convertID = ID; |
37 |
} |
38 |
|
39 |
public ConvertItem(string key, string ProjectNo, string ID, string originfilePath) |
40 |
{ |
41 |
this._uniqueKey = key; |
42 |
this._projectNumber = ProjectNo; |
43 |
this._convertID = ID; |
44 |
this._originfilePath = originfilePath; |
45 |
|
46 |
string result = ""; |
47 |
if (originfilePath.Contains("/")) |
48 |
{ |
49 |
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
50 |
} |
51 |
else |
52 |
{ |
53 |
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
54 |
} |
55 |
this._FileName = result; |
56 |
} |
57 |
|
58 |
public ConvertItem(string key, string ProjectNo, string ID,string originfilePath,string convertPath) |
59 |
{ |
60 |
this._uniqueKey = key; |
61 |
this._projectNumber = ProjectNo; |
62 |
this._convertID = ID; |
63 |
this._originfilePath = originfilePath; |
64 |
this._convertPath = convertPath; |
65 |
|
66 |
string result = ""; |
67 |
if (originfilePath.Contains("/")) |
68 |
{ |
69 |
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
70 |
} |
71 |
else |
72 |
{ |
73 |
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
74 |
} |
75 |
this._FileName = result; |
76 |
} |
77 |
|
78 |
public ConvertItem(string key, string ProjectNo, string ID, string originfilePath, string convertPath, StatusCodeType Status,int currentPageNo,int totalPage,string exception) |
79 |
{ |
80 |
this._uniqueKey = key; |
81 |
this._projectNumber = ProjectNo; |
82 |
this._convertID = ID; |
83 |
this._originfilePath = originfilePath; |
84 |
this._convertPath = convertPath; |
85 |
this._convertState = (StatusCodeType)Status; |
86 |
this._currentPageNo = currentPageNo; |
87 |
this._totalPage = totalPage; |
88 |
this._exception = exception; |
89 |
|
90 |
string result = ""; |
91 |
if (originfilePath.Contains("/")) |
92 |
{ |
93 |
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
94 |
} |
95 |
else |
96 |
{ |
97 |
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
98 |
} |
99 |
this._FileName = result; |
100 |
} |
101 |
|
102 |
//public ConvertItem(string key, string ProjectNo, string ID, string originfilePath, string convertPath, string Status, int currentPageNo, int totalPage, string exception |
103 |
// ,string revision, string documentNo, string documentName, string groupName) |
104 |
//{//세미 |
105 |
// this._uniqueKey = key; |
106 |
// this._projectNumber = ProjectNo; |
107 |
// this._convertID = ID; |
108 |
// this._originfilePath = originfilePath; |
109 |
// this._convertPath = convertPath; |
110 |
// this._convertState = Status; |
111 |
// this._currentPageNo = currentPageNo; |
112 |
// this._totalPage = totalPage; |
113 |
// this._exception = exception; |
114 |
// this._revision = revision; |
115 |
// this._documentNo = documentNo; |
116 |
// this._docuemnt_Name = documentName; |
117 |
// this._GroupName = groupName; |
118 |
|
119 |
// string result = ""; |
120 |
// if (originfilePath.Contains("/")) |
121 |
// { |
122 |
// result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
123 |
// } |
124 |
// else |
125 |
// { |
126 |
// result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
127 |
// } |
128 |
// this._FileName = result; |
129 |
//} |
130 |
|
131 |
|
132 |
string _uniqueKey; |
133 |
string _projectNumber; |
134 |
string _convertID; |
135 |
string _serviceID; |
136 |
int _reConverter; |
137 |
string _originfilePath; |
138 |
string _FileName; |
139 |
string _convertPath; |
140 |
//string _convertState; |
141 |
StatusCodeType _convertState; |
142 |
int _currentPageNo; |
143 |
int _totalPage; |
144 |
string _exception; |
145 |
string _revision;//↓ DOCUMENT_ITEM |
146 |
string _documentNo; |
147 |
string _docuemnt_Name; |
148 |
string _GroupName; |
149 |
string _documentID; |
150 |
string _validation; |
151 |
|
152 |
|
153 |
|
154 |
DateTime _createtime; |
155 |
|
156 |
public event PropertyChangedEventHandler PropertyChanged; |
157 |
|
158 |
private void OnPropertyChanged(string propertyName) |
159 |
{ |
160 |
if (PropertyChanged != null) |
161 |
{ |
162 |
PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); |
163 |
} |
164 |
} |
165 |
|
166 |
[DataMember] |
167 |
public string ConvertID |
168 |
{ |
169 |
get |
170 |
{ |
171 |
return _convertID; |
172 |
} |
173 |
set |
174 |
{ |
175 |
if (_convertID != value) |
176 |
{ |
177 |
_convertID = value; |
178 |
OnPropertyChanged("ConvertID"); |
179 |
} |
180 |
} |
181 |
} |
182 |
|
183 |
[DataMember] |
184 |
public string ServiceID |
185 |
{ |
186 |
get |
187 |
{ |
188 |
return _serviceID; |
189 |
} |
190 |
set |
191 |
{ |
192 |
if (_serviceID != value) |
193 |
{ |
194 |
_serviceID = value; |
195 |
OnPropertyChanged("ServiceID"); |
196 |
} |
197 |
} |
198 |
} |
199 |
|
200 |
[DataMember] |
201 |
public int ReConverter |
202 |
{ |
203 |
get |
204 |
{ |
205 |
return _reConverter; |
206 |
} |
207 |
set |
208 |
{ |
209 |
if (_reConverter != value) |
210 |
{ |
211 |
_reConverter = value; |
212 |
OnPropertyChanged("ReConverter"); |
213 |
} |
214 |
} |
215 |
} |
216 |
|
217 |
[DataMember] |
218 |
public string OriginfilePath |
219 |
{ |
220 |
get |
221 |
{ |
222 |
return _originfilePath; |
223 |
} |
224 |
set |
225 |
{ |
226 |
if (_originfilePath != value) |
227 |
{ |
228 |
_originfilePath = value; |
229 |
OnPropertyChanged("OriginfilePath"); |
230 |
} |
231 |
} |
232 |
} |
233 |
|
234 |
|
235 |
[DataMember] |
236 |
public string FileName |
237 |
{ |
238 |
get |
239 |
{ |
240 |
return _FileName; |
241 |
} |
242 |
set |
243 |
{ |
244 |
if (_FileName != value) |
245 |
{ |
246 |
_FileName = value; |
247 |
OnPropertyChanged("FileName"); |
248 |
} |
249 |
} |
250 |
} |
251 |
|
252 |
|
253 |
[DataMember] |
254 |
public string ConvertPath |
255 |
{ |
256 |
get |
257 |
{ |
258 |
return _convertPath; |
259 |
} |
260 |
set |
261 |
{ |
262 |
if (_convertPath != value) |
263 |
{ |
264 |
_convertPath = value; |
265 |
OnPropertyChanged("ConvertPath"); |
266 |
} |
267 |
} |
268 |
} |
269 |
|
270 |
[DataMember] |
271 |
public StatusCodeType ConvertState |
272 |
{ |
273 |
get |
274 |
{ |
275 |
return _convertState; |
276 |
} |
277 |
set |
278 |
{ |
279 |
if (_convertState != value) |
280 |
{ |
281 |
_convertState = value; |
282 |
OnPropertyChanged("ConvertState"); |
283 |
} |
284 |
} |
285 |
} |
286 |
|
287 |
[DataMember] |
288 |
public string ProjectNumber |
289 |
{ |
290 |
get |
291 |
{ |
292 |
return _projectNumber; |
293 |
} |
294 |
set |
295 |
{ |
296 |
if (_projectNumber != value) |
297 |
{ |
298 |
_projectNumber = value; |
299 |
OnPropertyChanged("ProjectNumber"); |
300 |
} |
301 |
} |
302 |
} |
303 |
|
304 |
[DataMember] |
305 |
public int TotalPage |
306 |
{ |
307 |
get |
308 |
{ |
309 |
return _totalPage; |
310 |
} |
311 |
set |
312 |
{ |
313 |
if (_totalPage != value) |
314 |
{ |
315 |
_totalPage = value; |
316 |
OnPropertyChanged("TotalPage"); |
317 |
} |
318 |
} |
319 |
} |
320 |
|
321 |
[DataMember] |
322 |
public int CurrentPageNo |
323 |
{ |
324 |
get |
325 |
{ |
326 |
return _currentPageNo; |
327 |
} |
328 |
set |
329 |
{ |
330 |
if (_currentPageNo != value) |
331 |
{ |
332 |
_currentPageNo = value; |
333 |
OnPropertyChanged("CurrentPageNo"); |
334 |
} |
335 |
} |
336 |
} |
337 |
|
338 |
[DataMember] |
339 |
public DateTime CreateTime |
340 |
{ |
341 |
get |
342 |
{ |
343 |
return _createtime; |
344 |
} |
345 |
set |
346 |
{ |
347 |
if (_createtime != value) |
348 |
{ |
349 |
_createtime = value; |
350 |
OnPropertyChanged("CreateTime"); |
351 |
} |
352 |
} |
353 |
} |
354 |
|
355 |
[DataMember] |
356 |
public string UniqueKey |
357 |
{ |
358 |
get |
359 |
{ |
360 |
return _uniqueKey; |
361 |
} |
362 |
set |
363 |
{ |
364 |
if (_uniqueKey != value) |
365 |
{ |
366 |
_uniqueKey = value; |
367 |
OnPropertyChanged("UniqueKey"); |
368 |
} |
369 |
} |
370 |
} |
371 |
|
372 |
|
373 |
[DataMember] |
374 |
public string Exception |
375 |
{ |
376 |
get |
377 |
{ |
378 |
return _exception; |
379 |
} |
380 |
set |
381 |
{ |
382 |
if (_exception != value) |
383 |
{ |
384 |
_exception = value; |
385 |
OnPropertyChanged("Exception"); |
386 |
|
387 |
} |
388 |
} |
389 |
} |
390 |
|
391 |
[DataMember] |
392 |
public Int64 ProcessorAffinity { get; set; } |
393 |
|
394 |
[DataMember] |
395 |
public string Revision |
396 |
{ |
397 |
get |
398 |
{ |
399 |
return _revision; |
400 |
} |
401 |
set |
402 |
{ |
403 |
if (_revision != value) |
404 |
{ |
405 |
_revision = value; |
406 |
OnPropertyChanged("REVISION"); |
407 |
|
408 |
} |
409 |
} |
410 |
} |
411 |
|
412 |
[DataMember] |
413 |
public string DocumnetNo |
414 |
{ |
415 |
get |
416 |
{ |
417 |
return _documentNo; |
418 |
} |
419 |
set |
420 |
{ |
421 |
if (_documentNo != value) |
422 |
{ |
423 |
_documentNo = value; |
424 |
OnPropertyChanged("DOCUMENT_NO"); |
425 |
|
426 |
} |
427 |
} |
428 |
} |
429 |
|
430 |
[DataMember] |
431 |
public string DocumnetName |
432 |
{ |
433 |
get |
434 |
{ |
435 |
return _docuemnt_Name; |
436 |
} |
437 |
set |
438 |
{ |
439 |
if (_docuemnt_Name != value) |
440 |
{ |
441 |
_docuemnt_Name = value; |
442 |
OnPropertyChanged("DOCUMENT_NAME"); |
443 |
|
444 |
} |
445 |
} |
446 |
} |
447 |
|
448 |
[DataMember] |
449 |
public string GroupNo |
450 |
{ |
451 |
get |
452 |
{ |
453 |
return _GroupName; |
454 |
} |
455 |
set |
456 |
{ |
457 |
if (_GroupName != value) |
458 |
{ |
459 |
_GroupName = value; |
460 |
OnPropertyChanged("GROUP_NO"); |
461 |
|
462 |
} |
463 |
} |
464 |
} |
465 |
|
466 |
|
467 |
[DataMember] |
468 |
public string DocumentID |
469 |
{ |
470 |
get |
471 |
{ |
472 |
return _documentID; |
473 |
} |
474 |
set |
475 |
{ |
476 |
if (_documentID != value) |
477 |
{ |
478 |
_documentID = value; |
479 |
OnPropertyChanged("DocumentID"); |
480 |
|
481 |
} |
482 |
} |
483 |
} |
484 |
|
485 |
|
486 |
[DataMember] |
487 |
public string Validation |
488 |
{ |
489 |
get |
490 |
{ |
491 |
return _validation; |
492 |
} |
493 |
set |
494 |
{ |
495 |
if (_validation != value) |
496 |
{ |
497 |
_validation = value; |
498 |
OnPropertyChanged("Validation"); |
499 |
|
500 |
} |
501 |
} |
502 |
} |
503 |
} |
504 |
} |