コード例 #1
0
        public int CompareTo(object obj)
        {
            int result;

            if (obj == null || !(obj is BaseTestResult))
            {
                result = 1;
            }
            else
            {
                BaseTestResult baseTestResult = obj as BaseTestResult;
                if (baseTestResult.HitVisual == null)
                {
                    result = 1;
                }
                else if (this.HitVisual == null)
                {
                    result = -1;
                }
                else
                {
                    result = this.HitVisual.CompareTo(baseTestResult.HitVisual);
                }
            }
            return(result);
        }
コード例 #2
0
        public int CompareTo(object obj)
        {
            if (obj == null || !(obj is BaseTestResult))
            {
                return(1);
            }
            BaseTestResult baseTestResult = obj as BaseTestResult;

            if (baseTestResult.HitVisual == null)
            {
                return(1);
            }
            if (this.HitVisual == null)
            {
                return(-1);
            }
            return(this.HitVisual.CompareTo((object)baseTestResult.HitVisual));
        }