markus / ConvertService / ServiceBase / IServiceBase / ConvertItem.cs @ a6e5055d
이력 | 보기 | 이력해설 | 다운로드 (8.78 KB)
1 | 53c9637d | taeseongkim | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | a6e5055d | alzkakdixm | using System.ComponentModel; |
4 | 53c9637d | taeseongkim | using System.Linq; |
5 | using System.Runtime.Serialization; |
||
6 | using System.Text; |
||
7 | using System.Threading.Tasks; |
||
8 | |||
9 | namespace Markus.Service.Interface |
||
10 | { |
||
11 | [DataContract] |
||
12 | a6e5055d | alzkakdixm | public class ConvertItem : IEquatable<ConvertItem> ,INotifyPropertyChanged |
13 | 53c9637d | taeseongkim | { |
14 | b92f142f | taeseongkim | public bool Equals(ConvertItem other) |
15 | { |
||
16 | if (other is null) |
||
17 | return false; |
||
18 | |||
19 | return this.ConvertID == other.ConvertID && this.ProjectNumber == other.ProjectNumber; |
||
20 | } |
||
21 | |||
22 | public override bool Equals(object obj) => Equals(obj as ConvertItem); |
||
23 | public override int GetHashCode() |
||
24 | { |
||
25 | var id = (ConvertID != null) ? ConvertID : ""; |
||
26 | var project = (ProjectNumber != null) ? ProjectNumber : ""; |
||
27 | |||
28 | return (id + project).GetHashCode(); |
||
29 | } |
||
30 | |||
31 | a6e5055d | alzkakdixm | |
32 | public ConvertItem(string ProjectNo, string ID) |
||
33 | 53c9637d | taeseongkim | { |
34 | this._projectNumber = ProjectNo; |
||
35 | this._convertID = ID; |
||
36 | } |
||
37 | |||
38 | public ConvertItem(string key, string ProjectNo, string ID, string originfilePath) |
||
39 | { |
||
40 | this._uniqueKey = key; |
||
41 | this._projectNumber = ProjectNo; |
||
42 | this._convertID = ID; |
||
43 | this._originfilePath = originfilePath; |
||
44 | a6e5055d | alzkakdixm | |
45 | string result = ""; |
||
46 | if (originfilePath.Contains("/")) |
||
47 | { |
||
48 | result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
||
49 | } |
||
50 | else |
||
51 | { |
||
52 | result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
||
53 | } |
||
54 | this._FileName = result; |
||
55 | 53c9637d | taeseongkim | } |
56 | |||
57 | public ConvertItem(string key, string ProjectNo, string ID,string originfilePath,string convertPath) |
||
58 | { |
||
59 | this._uniqueKey = key; |
||
60 | this._projectNumber = ProjectNo; |
||
61 | this._convertID = ID; |
||
62 | this._originfilePath = originfilePath; |
||
63 | this._convertPath = convertPath; |
||
64 | a6e5055d | alzkakdixm | |
65 | string result = ""; |
||
66 | if (originfilePath.Contains("/")) |
||
67 | { |
||
68 | result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
||
69 | } |
||
70 | else |
||
71 | { |
||
72 | result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
||
73 | } |
||
74 | this._FileName = result; |
||
75 | 53c9637d | taeseongkim | } |
76 | |||
77 | public ConvertItem(string key, string ProjectNo, string ID, string originfilePath, string convertPath,string Status,int currentPageNo,int totalPage,string exception) |
||
78 | { |
||
79 | this._uniqueKey = key; |
||
80 | this._projectNumber = ProjectNo; |
||
81 | this._convertID = ID; |
||
82 | this._originfilePath = originfilePath; |
||
83 | this._convertPath = convertPath; |
||
84 | this._convertState = Status; |
||
85 | this._currentPageNo = currentPageNo; |
||
86 | this._totalPage = totalPage; |
||
87 | this._exception = exception; |
||
88 | a6e5055d | alzkakdixm | |
89 | string result = ""; |
||
90 | if (originfilePath.Contains("/")) |
||
91 | { |
||
92 | result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
||
93 | } |
||
94 | else |
||
95 | { |
||
96 | result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
||
97 | } |
||
98 | this._FileName = result; |
||
99 | 53c9637d | taeseongkim | } |
100 | |||
101 | |||
102 | string _uniqueKey; |
||
103 | string _projectNumber; |
||
104 | string _convertID; |
||
105 | 06f13e11 | taeseongkim | string _serviceID; |
106 | int _reConverter; |
||
107 | 53c9637d | taeseongkim | string _originfilePath; |
108 | a6e5055d | alzkakdixm | string _FileName; |
109 | 53c9637d | taeseongkim | string _convertPath; |
110 | string _convertState; |
||
111 | int _currentPageNo; |
||
112 | int _totalPage; |
||
113 | string _exception; |
||
114 | |||
115 | |||
116 | DateTime _createtime; |
||
117 | |||
118 | a6e5055d | alzkakdixm | public event PropertyChangedEventHandler PropertyChanged; |
119 | private void OnPropertyChanged(string propertyName) |
||
120 | { |
||
121 | if (PropertyChanged != null) |
||
122 | { |
||
123 | PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); |
||
124 | } |
||
125 | } |
||
126 | |||
127 | |||
128 | 53c9637d | taeseongkim | [DataMember] |
129 | a6e5055d | alzkakdixm | public string ConvertID |
130 | { |
||
131 | get |
||
132 | { |
||
133 | return _convertID; |
||
134 | } |
||
135 | set |
||
136 | { |
||
137 | if (_convertID != value) |
||
138 | { |
||
139 | _convertID = value; |
||
140 | OnPropertyChanged("ConvertID"); |
||
141 | } |
||
142 | } |
||
143 | } |
||
144 | 53c9637d | taeseongkim | |
145 | [DataMember] |
||
146 | a6e5055d | alzkakdixm | public string ServiceID |
147 | { |
||
148 | get |
||
149 | { |
||
150 | return _serviceID; |
||
151 | } |
||
152 | set |
||
153 | { |
||
154 | if (_serviceID != value) |
||
155 | { |
||
156 | _serviceID = value; |
||
157 | this.OnPropertyChanged("ServiceID"); |
||
158 | } |
||
159 | } |
||
160 | } |
||
161 | 06f13e11 | taeseongkim | |
162 | [DataMember] |
||
163 | a6e5055d | alzkakdixm | public int ReConverter |
164 | { |
||
165 | get |
||
166 | { |
||
167 | return _reConverter; |
||
168 | } |
||
169 | set |
||
170 | { |
||
171 | if (_reConverter != value) |
||
172 | { |
||
173 | _reConverter = value; |
||
174 | this.OnPropertyChanged("ReConverter"); |
||
175 | } |
||
176 | } |
||
177 | } |
||
178 | 06f13e11 | taeseongkim | |
179 | [DataMember] |
||
180 | a6e5055d | alzkakdixm | public string OriginfilePath |
181 | { |
||
182 | get |
||
183 | { |
||
184 | return _originfilePath; |
||
185 | } |
||
186 | set |
||
187 | { |
||
188 | if (_originfilePath != value) |
||
189 | { |
||
190 | _originfilePath = value; |
||
191 | this.OnPropertyChanged("OriginfilePath"); |
||
192 | } |
||
193 | } |
||
194 | } |
||
195 | |||
196 | 53c9637d | taeseongkim | |
197 | [DataMember] |
||
198 | a6e5055d | alzkakdixm | public string FileName |
199 | { |
||
200 | get |
||
201 | { |
||
202 | return _FileName; |
||
203 | } |
||
204 | set |
||
205 | { |
||
206 | if (_FileName != value) |
||
207 | { |
||
208 | _FileName = value; |
||
209 | this.OnPropertyChanged("FileName"); |
||
210 | } |
||
211 | } |
||
212 | } |
||
213 | |||
214 | 53c9637d | taeseongkim | |
215 | [DataMember] |
||
216 | a6e5055d | alzkakdixm | public string ConvertPath |
217 | { |
||
218 | get |
||
219 | { |
||
220 | return _convertPath; |
||
221 | } |
||
222 | set |
||
223 | { |
||
224 | if (_convertPath != value) |
||
225 | { |
||
226 | _convertPath = value; |
||
227 | this.OnPropertyChanged("ConvertPath"); |
||
228 | } |
||
229 | } |
||
230 | } |
||
231 | 53c9637d | taeseongkim | |
232 | [DataMember] |
||
233 | a6e5055d | alzkakdixm | public string ConvertState |
234 | { |
||
235 | get |
||
236 | { |
||
237 | return _convertState; |
||
238 | } |
||
239 | set |
||
240 | { |
||
241 | if (_convertState != value) |
||
242 | { |
||
243 | _convertState = value; |
||
244 | this.OnPropertyChanged("ConvertState"); |
||
245 | } |
||
246 | } |
||
247 | } |
||
248 | 53c9637d | taeseongkim | |
249 | [DataMember] |
||
250 | a6e5055d | alzkakdixm | public string ProjectNumber |
251 | { |
||
252 | get |
||
253 | { |
||
254 | return _projectNumber; |
||
255 | } |
||
256 | set |
||
257 | { |
||
258 | if (_projectNumber != value) |
||
259 | { |
||
260 | _projectNumber = value; |
||
261 | OnPropertyChanged("ProjectNumber"); |
||
262 | } |
||
263 | } |
||
264 | } |
||
265 | |||
266 | [DataMember] |
||
267 | public int TotalPage |
||
268 | { |
||
269 | get |
||
270 | { |
||
271 | return _totalPage; |
||
272 | } |
||
273 | set |
||
274 | { |
||
275 | if (_totalPage != value) |
||
276 | { |
||
277 | _totalPage = value; |
||
278 | this.OnPropertyChanged("TotalPage"); |
||
279 | } |
||
280 | } |
||
281 | } |
||
282 | 53c9637d | taeseongkim | |
283 | [DataMember] |
||
284 | a6e5055d | alzkakdixm | public int CurrentPageNo |
285 | { |
||
286 | get |
||
287 | { |
||
288 | return _currentPageNo; |
||
289 | } |
||
290 | set |
||
291 | { |
||
292 | if (_currentPageNo != value) |
||
293 | { |
||
294 | _currentPageNo = value; |
||
295 | this.OnPropertyChanged("CurrentPageNo"); |
||
296 | } |
||
297 | } |
||
298 | } |
||
299 | 53c9637d | taeseongkim | |
300 | [DataMember] |
||
301 | a6e5055d | alzkakdixm | public DateTime CreateTime |
302 | { |
||
303 | get |
||
304 | { |
||
305 | return _createtime; |
||
306 | } |
||
307 | set |
||
308 | { |
||
309 | if (_createtime != value) |
||
310 | { |
||
311 | _createtime = value; |
||
312 | this.OnPropertyChanged("CreateTime"); |
||
313 | } |
||
314 | } |
||
315 | } |
||
316 | 53c9637d | taeseongkim | |
317 | [DataMember] |
||
318 | a6e5055d | alzkakdixm | public string UniqueKey |
319 | { |
||
320 | get |
||
321 | { |
||
322 | return _uniqueKey; |
||
323 | } |
||
324 | set |
||
325 | { |
||
326 | if (_uniqueKey != value) |
||
327 | { |
||
328 | _uniqueKey = value; |
||
329 | this.OnPropertyChanged("UniqueKey"); |
||
330 | } |
||
331 | } |
||
332 | } |
||
333 | 53c9637d | taeseongkim | |
334 | |||
335 | [DataMember] |
||
336 | a6e5055d | alzkakdixm | public string Exception |
337 | { |
||
338 | get |
||
339 | { |
||
340 | return _exception; |
||
341 | } |
||
342 | set |
||
343 | { |
||
344 | if (_exception != value) |
||
345 | { |
||
346 | _exception = value; |
||
347 | this.OnPropertyChanged("Exception"); |
||
348 | } |
||
349 | } |
||
350 | } |
||
351 | 53c9637d | taeseongkim | |
352 | [DataMember] |
||
353 | public Int64 ProcessorAffinity { get; set; } |
||
354 | } |
||
355 | } |