コード例 #1
0
        public int Compare(SyntaxNode?x, SyntaxNode?y)
        {
            if (x is null)
            {
                if (y is null)
                {
                    return(0);
                }

                return(-1);
            }
            else if (y is null)
            {
                return(1);
            }
            else
            {
                return(_compilation.CompareSourceLocations(x.GetLocation(), y.GetLocation()));
            }
        }
コード例 #2
0
 public int Compare(SyntaxNode x, SyntaxNode y)
 {
     return(compilation.CompareSourceLocations(x.GetLocation(), y.GetLocation()));
 }