init
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using DTS.Common.Interface.DASFactory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.DASLib.Service.Interfaces
|
||||
{
|
||||
// Custom comparer for the IDASCommunication class.
|
||||
public class IDASCommunicationComparer : IComparer<IDASCommunication>
|
||||
{
|
||||
public int Compare(IDASCommunication x, IDASCommunication y)
|
||||
{
|
||||
if (x == null && y == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (x != null && y == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (x == null && y != null)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Check whether the compared objects reference the same data.
|
||||
if (Object.ReferenceEquals(x, y))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Check whether the GainInfos' properties are equal.
|
||||
return x.SerialNumber.CompareTo(y.SerialNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user