개정판 78683624
ConvertPath Icon추가 & Interface삭제
Change-Id: I9b142f056f876d6daa2e2d9f527cf03b93997078
ConvertService/ServiceBase/Markus.Service.Extensions/Helper/ConvertItemComparer.cs | ||
---|---|---|
1 |
using Markus.Service.Interface; |
|
2 |
using System; |
|
3 |
using System.Collections.Generic; |
|
4 |
using System.Linq; |
|
5 |
using System.Text; |
|
6 |
using System.Threading.Tasks; |
|
1 |
//using Markus.Service.Interface;
|
|
2 |
//using System;
|
|
3 |
//using System.Collections.Generic;
|
|
4 |
//using System.Linq;
|
|
5 |
//using System.Text;
|
|
6 |
//using System.Threading.Tasks;
|
|
7 | 7 |
|
8 |
namespace Markus.Service.Helper |
|
9 |
{ |
|
10 |
public class ConvertItemComparer : IEqualityComparer<ConvertItem> |
|
11 |
{ |
|
12 |
public bool Equals(ConvertItem x, ConvertItem y) |
|
13 |
{ |
|
14 |
if (Object.ReferenceEquals(x, y)) return true; |
|
8 |
//namespace Markus.Service.Helper
|
|
9 |
//{
|
|
10 |
// public class ConvertItemComparer : IEqualityComparer<ConvertItem>
|
|
11 |
// {
|
|
12 |
// public bool Equals(ConvertItem x, ConvertItem y)
|
|
13 |
// {
|
|
14 |
// if (Object.ReferenceEquals(x, y)) return true;
|
|
15 | 15 |
|
16 |
if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null)) |
|
17 |
return false; |
|
16 |
// if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
|
|
17 |
// return false;
|
|
18 | 18 |
|
19 |
return x.ConvertID == y.ConvertID && x.ProjectNumber == y.ProjectNumber; |
|
20 |
} |
|
19 |
// return x.ConvertID == y.ConvertID && x.ProjectNumber == y.ProjectNumber;
|
|
20 |
// }
|
|
21 | 21 |
|
22 | 22 |
|
23 |
public int GetHashCode(ConvertItem convertItem) |
|
24 |
{ |
|
25 |
var id = (convertItem.ConvertID != null) ? convertItem.ConvertID : ""; |
|
26 |
var project = (convertItem.ProjectNumber != null) ? convertItem.ProjectNumber : ""; |
|
23 |
// public int GetHashCode(ConvertItem convertItem)
|
|
24 |
// {
|
|
25 |
// var id = (convertItem.ConvertID != null) ? convertItem.ConvertID : "";
|
|
26 |
// var project = (convertItem.ProjectNumber != null) ? convertItem.ProjectNumber : "";
|
|
27 | 27 |
|
28 |
return (id + project).GetHashCode(); |
|
29 |
} |
|
30 |
} |
|
31 |
} |
|
28 |
// return (id + project).GetHashCode(); |
|
29 |
// } |
|
30 |
// } |
|
31 |
//} |
내보내기 Unified diff