public string GetHighlightMode(IHighlightAlgorithm <TVertex, TEdge, TGraph> algorithm) { if (algorithm is ReachableHighlightAlgorithm <TVertex, TEdge, TGraph> ) { return(HighlightModeName); } return(null); }
public string GetHighlightMode(IHighlightAlgorithm <TVertex, TEdge, TGraph> algorithm) { if (algorithm is SimpleHighlightAlgorithm <TVertex, TEdge, TGraph> ) { return("Simple"); } return(null); }
/// <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)); }