Exemple #1
0
        public int CompareTo(ValueVersion other)
        {
            var instanceCompared = InstanceId.CompareTo(other.InstanceId);

            if (instanceCompared == 0)
            {
                return(Number.CompareTo(other.Number));
            }
            return(instanceCompared);
        }
Exemple #2
0
        public int CompareTo(object obj)
        {
            if (obj is null)
            {
                throw new Exception(Properties.Resources.CompareObjIsNull);
            }

            var rdpTerminal = obj as RDPTerminal;

            if (rdpTerminal is null)
            {
                throw new Exception(Properties.Resources.ObjIsNotRDPTerminal);
            }
#pragma warning disable CA1307 // Specify StringComparison
            return(InstanceId.CompareTo(rdpTerminal.InstanceId));

#pragma warning restore CA1307 // Specify StringComparison
        }