public static ImplPackageYaml fromYaml(YamlValue obj)
        {
            var languages = new Dictionary <string, ImplPkgLanguage> {
            };
            var langDict  = obj.dict("languages");

            if (langDict != null)
            {
                foreach (var langName in Object.keys(langDict))
                {
                    languages.set(langName, ImplPkgLanguage.fromYaml(langDict.get(langName)));
                }
            }

            return(new ImplPackageYaml(obj.dbl("file-version"), obj.str("vendor"), obj.str("name"), obj.str("description"), obj.str("version"), obj.strArr("includes"), obj.arr("implements").map(impl => ImplPkgImplementation.fromYaml(impl)), languages));
        }
Exemplo n.º 2
0
 public static ProjectTemplateMeta fromYaml(YamlValue obj)
 {
     return(new ProjectTemplateMeta(obj.str("language"), obj.str("destination-dir"), obj.str("package-dir"), obj.strArr("template-files")));
 }
 public static InterfaceYaml fromYaml(YamlValue obj)
 {
     return(new InterfaceYaml(obj.dbl("file-version"), obj.str("vendor"), obj.str("name"), obj.dbl("version"), obj.str("definition-file"), obj.arr("dependencies").map(dep => new InterfaceDependency(dep.str("name"), dep.dbl("minver")))));
 }
 public static ImplPkgLanguage fromYaml(YamlValue obj)
 {
     return(new ImplPkgLanguage(obj.str("id"), obj.str("package-dir"), obj.strArr("generator-plugins"), obj.str("native-src-dir"), obj.arr("native-dependencies").map(impl => ImplPkgNativeDependency.fromYaml(impl))));
 }
 public static ImplPkgNativeDependency fromYaml(YamlValue obj)
 {
     return(new ImplPkgNativeDependency(obj.str("name"), obj.str("version")));
 }
 public static ImplPkgImplementation fromYaml(YamlValue obj)
 {
     return(new ImplPkgImplementation(ImplPkgImplIntf.fromYaml(obj.obj("interface")), obj.str("language"), obj.strArr("native-includes"), obj.str("native-include-dir")));
 }
 public static ImplPkgImplIntf fromYaml(YamlValue obj)
 {
     return(new ImplPkgImplIntf(obj.str("name"), obj.dbl("minver"), obj.dbl("maxver")));
 }