GetSpecNames() public static method

public static GetSpecNames ( string xref, string supportedLanguages, SortedList specs = null ) : List
xref string
supportedLanguages string
specs SortedList
return List
Ejemplo n.º 1
0
 public static List <ApiLanguageValuePair> GetSpec(string key, Dictionary <string, ApiReferenceBuildOutput> references, string[] supportedLanguages)
 {
     if (string.IsNullOrEmpty(key))
     {
         return(null);
     }
     if (!references.TryGetValue(key, out ApiReferenceBuildOutput reference))
     {
         return(ApiReferenceBuildOutput.GetSpecNames(GetXref(key), supportedLanguages));
     }
     else
     {
         return(reference.Spec);
     }
 }
Ejemplo n.º 2
0
        public static ApiReferenceBuildOutput GetReferenceViewModel(string key, Dictionary <string, ApiReferenceBuildOutput> references, string[] supportedLanguages)
        {
            if (string.IsNullOrEmpty(key))
            {
                return(null);
            }
            if (!references.TryGetValue(key, out ApiReferenceBuildOutput arbo))
            {
                arbo = new ApiReferenceBuildOutput
                {
                    Spec = ApiReferenceBuildOutput.GetSpecNames(GetXref(key), supportedLanguages),
                };
            }
            else
            {
                arbo.Expand(references, supportedLanguages);
            }

            return(arbo);
        }