프로젝트

일반

사용자정보

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

markus / ConvertService / ServiceBase / IServiceBase / ConvertItem.cs @ e6281033

이력 | 보기 | 이력해설 | 다운로드 (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
        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

    
151

    
152

    
153
        DateTime _createtime;
154

    
155
        public event PropertyChangedEventHandler PropertyChanged;
156

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

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

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

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

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

    
233

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

    
251

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

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

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

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

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

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

    
354
        [DataMember]
355
        public string UniqueKey
356
        {
357
            get
358
            {
359
                return _uniqueKey;
360
            }
361
            set
362
            {
363
                if (_uniqueKey != value)
364
                {
365
                    _uniqueKey = value;
366
                    OnPropertyChanged("UniqueKey");
367
                }
368
            }
369
        }
370

    
371

    
372
        [DataMember]
373
        public string Exception
374
        {
375
            get
376
            {
377
                return _exception;
378
            }
379
            set
380
            {
381
                if (_exception != value)
382
                {
383
                    _exception = value;
384
                   OnPropertyChanged("Exception");
385

    
386
                }
387
            }
388
        }
389

    
390
        [DataMember]
391
        public Int64 ProcessorAffinity { get; set; }
392

    
393
        [DataMember]
394
        public string Revision
395
        {
396
            get
397
            {
398
                return _revision;
399
            }
400
            set
401
            {
402
                if (_revision != value)
403
                {
404
                    _revision = value;
405
                    OnPropertyChanged("REVISION");
406

    
407
                }
408
            }
409
        }
410

    
411
        [DataMember]
412
        public string DocumnetNo
413
        {
414
            get
415
            {
416
                return _documentNo;
417
            }
418
            set
419
            {
420
                if (_documentNo != value)
421
                {
422
                    _documentNo = value;
423
                    OnPropertyChanged("DOCUMENT_NO");
424

    
425
                }
426
            }
427
        }
428

    
429
        [DataMember]
430
        public string DocumnetName
431
        {
432
            get
433
            {
434
                return _docuemnt_Name;
435
            }
436
            set
437
            {
438
                if (_docuemnt_Name != value)
439
                {
440
                    _docuemnt_Name = value;
441
                    OnPropertyChanged("DOCUMENT_NAME");
442

    
443
                }
444
            }
445
        }
446

    
447
        [DataMember]
448
        public string GroupNo
449
        {
450
            get
451
            {
452
                return _GroupName;
453
            }
454
            set
455
            {
456
                if (_GroupName != value)
457
                {
458
                    _GroupName = value;
459
                    OnPropertyChanged("GROUP_NO");
460

    
461
                }
462
            }
463
        }
464

    
465

    
466
        [DataMember]
467
        public string DocumentID
468
        {
469
            get
470
            {
471
                return _documentID;
472
            }
473
            set
474
            {
475
                if (_documentID != value)
476
                {
477
                    _documentID = value;
478
                    OnPropertyChanged("DocumentID");
479

    
480
                }
481
            }
482
        }
483

    
484

    
485
        [DataMember]
486
        public string Validation
487
        {
488
            get
489
            {
490
                return _validation;
491
            }
492
            set
493
            {
494
                if (_validation != value)
495
                {
496
                    _validation = value;
497
                    OnPropertyChanged("Validation");
498

    
499
                }
500
            }
501
        }
502
    }
503
}
클립보드 이미지 추가 (최대 크기: 500 MB)