프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / ConvertService / ServiceBase / IServiceBase / ConvertItem.cs @ 344ac7ed

이력 | 보기 | 이력해설 | 다운로드 (13.8 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
        StatusCodeType _convertState;
141
        int _currentPageNo;
142
        int _totalPage;
143
        string _exception;
144
        string _revision;//↓ DOCUMENT_ITEM
145
        string _documentNo;
146
        string _docuemnt_Name;
147
        string _GroupName;
148
        string _documentID;
149
        string _validation;
150
        string _MarkusLink;
151

    
152

    
153
        DateTime _createtime;
154
        DateTime? _starttime;
155
        DateTime? _endtime;
156

    
157
        public event PropertyChangedEventHandler PropertyChanged;
158

    
159
        private void OnPropertyChanged(string propertyName)
160
        {
161
            if (PropertyChanged != null)
162
            {
163
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
164
            }
165
        }
166

    
167
        [DataMember]
168
        public string ConvertID
169
        {
170
            get
171
            {
172
                return _convertID;
173
            }
174
            set
175
            {
176
                if (_convertID != value)
177
                {
178
                    _convertID = value;
179
                    OnPropertyChanged("ConvertID");
180
                }
181
            }
182
        }
183

    
184
        [DataMember]
185
        public string ServiceID
186
        {
187
            get
188
            {
189
                return _serviceID;
190
            }
191
            set
192
            {
193
                if (_serviceID != value)
194
                {
195
                    _serviceID = value;
196
                    OnPropertyChanged("ServiceID");
197
                }
198
            }
199
        }
200

    
201
        [DataMember]
202
        public int ReConverter
203
        {
204
            get
205
            {
206
                return _reConverter;
207
            }
208
            set
209
            {
210
                if (_reConverter != value)
211
                {
212
                    _reConverter = value;
213
                    OnPropertyChanged("ReConverter");
214
                }
215
            }
216
        }
217

    
218
        [DataMember]
219
        public string OriginfilePath
220
        {
221
            get
222
            {
223
                return _originfilePath;
224
            }
225
            set
226
            {
227
                if (_originfilePath != value)
228
                {
229
                    _originfilePath = value;
230
                    OnPropertyChanged("OriginfilePath");
231
                }
232
            }
233
        }
234

    
235

    
236
        [DataMember]
237
        public string FileName
238
        {
239
            get
240
            {
241
                return _FileName;
242
            }
243
            set
244
            {
245
                if (_FileName != value)
246
                {
247
                    _FileName = value;
248
                    OnPropertyChanged("FileName");
249
                }
250
            }
251
        }
252

    
253

    
254
        [DataMember]
255
        public string ConvertPath
256
        {
257
            get
258
            {
259
                return _convertPath;
260
            }
261
            set
262
            {
263
                if (_convertPath != value)
264
                {
265
                    _convertPath = value;
266
                   OnPropertyChanged("ConvertPath");
267
                }
268
            }
269
        }
270

    
271
        [DataMember]
272
        public StatusCodeType ConvertState
273
        {
274
            get
275
            {
276
                return _convertState;
277
            }
278
            set
279
            {
280
                if (_convertState != value)
281
                {
282
                    _convertState = value;
283
                    OnPropertyChanged("ConvertState");
284
                }
285
            }
286
        }
287

    
288
        [DataMember]
289
        public string ProjectNumber
290
        {
291
            get
292
            {
293
                return _projectNumber;
294
            }
295
            set
296
            {
297
                if (_projectNumber != value)
298
                {
299
                    _projectNumber = value;
300
                    OnPropertyChanged("ProjectNumber");
301
                }
302
            }
303
        }
304

    
305
        [DataMember]
306
        public int TotalPage
307
        {
308
            get
309
            {
310
                return _totalPage;
311
            }
312
            set
313
            {
314
                if (_totalPage != value)
315
                {
316
                    _totalPage = value;
317
                    OnPropertyChanged("TotalPage");
318
                }
319
            }
320
        }
321

    
322
        [DataMember]
323
        public int CurrentPageNo
324
        {
325
            get
326
            {
327
                return _currentPageNo;
328
            }
329
            set
330
            {
331
                if (_currentPageNo != value)
332
                {
333
                    _currentPageNo = value;
334
                    OnPropertyChanged("CurrentPageNo");
335
                }
336
            }
337
        }
338

    
339
        [DataMember]
340
        public DateTime CreateTime
341
        {
342
            get
343
            {
344
                return _createtime;
345
            }
346
            set
347
            {
348
                if (_createtime != value)
349
                {
350
                    _createtime = value;
351
                    OnPropertyChanged("CreateTime");
352
                }
353
            }
354
        }
355

    
356
        [DataMember]
357
        public DateTime? StartTime
358
        {
359
            get
360
            {
361
                return _starttime;
362
            }
363
            set
364
            {
365
                if (value == null)
366
                {
367
                    _starttime = null;
368
                    OnPropertyChanged("StartTime");
369
                }
370
                else if (_starttime != value)
371
                {
372
                    _starttime = value;
373
                    OnPropertyChanged("StartTime");
374
                }
375
            }
376
        }
377

    
378
        [DataMember]
379
        public DateTime? EndTime
380
        {
381
            get
382
            {
383
                return _endtime;
384
            }
385
            set
386
            {
387
                if (value == null)
388
                {
389
                    _endtime = null;
390
                    OnPropertyChanged("EndTime");
391
                }
392
                else if (_endtime != value)
393
                {
394
                    _endtime = value;
395
                    OnPropertyChanged("EndTime");
396
                }
397
            }
398
        }
399

    
400
        [DataMember]
401
        public string UniqueKey
402
        {
403
            get
404
            {
405
                return _uniqueKey;
406
            }
407
            set
408
            {
409
                if (_uniqueKey != value)
410
                {
411
                    _uniqueKey = value;
412
                    OnPropertyChanged("UniqueKey");
413
                }
414
            }
415
        }
416

    
417

    
418
        [DataMember]
419
        public string Exception
420
        {
421
            get
422
            {
423
                return _exception;
424
            }
425
            set
426
            {
427
                if (_exception != value)
428
                {
429
                    _exception = value;
430
                   OnPropertyChanged("Exception");
431

    
432
                }
433
            }
434
        }
435

    
436
        [DataMember]
437
        public Int64 ProcessorAffinity { get; set; }
438

    
439
        [DataMember]
440
        public string Revision
441
        {
442
            get
443
            {
444
                return _revision;
445
            }
446
            set
447
            {
448
                if (_revision != value)
449
                {
450
                    _revision = value;
451
                    OnPropertyChanged("REVISION");
452

    
453
                }
454
            }
455
        }
456

    
457
        [DataMember]
458
        public string DocumnetNo
459
        {
460
            get
461
            {
462
                return _documentNo;
463
            }
464
            set
465
            {
466
                if (_documentNo != value)
467
                {
468
                    _documentNo = value;
469
                    OnPropertyChanged("DOCUMENT_NO");
470

    
471
                }
472
            }
473
        }
474

    
475
        [DataMember]
476
        public string DocumnetName
477
        {
478
            get
479
            {
480
                return _docuemnt_Name;
481
            }
482
            set
483
            {
484
                if (_docuemnt_Name != value)
485
                {
486
                    _docuemnt_Name = value;
487
                    OnPropertyChanged("DOCUMENT_NAME");
488

    
489
                }
490
            }
491
        }
492

    
493
        [DataMember]
494
        public string GroupNo
495
        {
496
            get
497
            {
498
                return _GroupName;
499
            }
500
            set
501
            {
502
                if (_GroupName != value)
503
                {
504
                    _GroupName = value;
505
                    OnPropertyChanged("GROUP_NO");
506

    
507
                }
508
            }
509
        }
510

    
511

    
512
        [DataMember]
513
        public string DocumentID
514
        {
515
            get
516
            {
517
                return _documentID;
518
            }
519
            set
520
            {
521
                if (_documentID != value)
522
                {
523
                    _documentID = value;
524
                    OnPropertyChanged("DocumentID");
525

    
526
                }
527
            }
528
        }
529

    
530

    
531
        [DataMember]
532
        public string Validation
533
        {
534
            get
535
            {
536
                return _validation;
537
            }
538
            set
539
            {
540
                if (_validation != value)
541
                {
542
                    _validation = value;
543
                    OnPropertyChanged("Validation");
544

    
545
                }
546
            }
547
        }
548

    
549
        [DataMember]
550
        public string MarkusLink
551
        {
552
            get
553
            {
554
                return _MarkusLink;
555
            }
556
            set
557
            {
558
                if (_MarkusLink != value)
559
                {
560
                    _MarkusLink = value;
561
                    OnPropertyChanged("MarkusLink");
562

    
563
                }
564
            }
565
        }
566
    }
567
}
클립보드 이미지 추가 (최대 크기: 500 MB)