コード例 #1
0
 public string GetHighlightMode(IHighlightAlgorithm <TVertex, TEdge, TGraph> algorithm)
 {
     if (algorithm is ReachableHighlightAlgorithm <TVertex, TEdge, TGraph> )
     {
         return(HighlightModeName);
     }
     return(null);
 }
コード例 #2
0
        public string GetHighlightMode(IHighlightAlgorithm <TVertex, TEdge, TGraph> algorithm)
        {
            if (algorithm is SimpleHighlightAlgorithm <TVertex, TEdge, TGraph> )
            {
                return("Simple");
            }

            return(null);
        }
コード例 #3
0
        /// <inheritdoc />
        public string GetHighlightMode(IHighlightAlgorithm <TVertex, TEdge> algorithm)
        {
            if (algorithm is null)
            {
                throw new ArgumentNullException(nameof(algorithm));
            }

            if (algorithm is SimpleHighlightAlgorithm <TVertex, TEdge, TGraph> )
            {
                return(SimpleMode);
            }
            return(null);
        }
        public string GetHighlightMode(IHighlightAlgorithm <TVertex, TEdge, TGraph> algorithm)
        {
            if (algorithm == null)
            {
                return(string.Empty);
            }

            int index = algorithm.GetType().Name.IndexOf("HighlightAlgorithm", StringComparison.Ordinal);

            if (index == -1)
            {
                return(string.Empty);
            }

            string algoType = algorithm.GetType().Name;

            return(algoType.Substring(0, algoType.Length - index));
        }