private static int GetStart(object value) { int indexValue; AP.AnalysisClassification xClass = value as AP.AnalysisClassification; if (xClass != null) { indexValue = xClass.start; } else { indexValue = (int)value; } return(indexValue); }
private static string ToVsClassificationName(AP.AnalysisClassification classification) { string typeName = null; switch (classification.type) { case "keyword": typeName = PredefinedClassificationTypeNames.Keyword; break; case "class": typeName = PythonPredefinedClassificationTypeNames.Class; break; case "function": typeName = PythonPredefinedClassificationTypeNames.Function; break; case "module": typeName = PythonPredefinedClassificationTypeNames.Module; break; case "parameter": typeName = PythonPredefinedClassificationTypeNames.Parameter; break; } return(typeName); }