Esempio n. 1
0
        private dynamic InitXaml()
        {
            dynamic node = new DynamicNode("ProjectSchemaDefinitions", "clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework");
            var     rule = node.Add("Rule");

            rule.Attributes.Name         = "ReferencedPackages{0}".format(Guid.NewGuid());
            rule.Attributes.PageTemplate = "tool";
            rule.Attributes.DisplayName  = "Referenced Packages";
            rule.Attributes.SwitchPrefix = "/";
            rule.Attributes.Order        = "1";

            var categories = rule.Add("Rule.Categories");
            var category   = categories.Add("Category");

            category.Attributes.Name        = _pkgName;
            category.Attributes.DisplayName = _pkgName;

            var datasources = rule.Add("Rule.DataSource");
            var datasource  = datasources.Add("DataSource");

            datasource.Attributes.Persistence = "ProjectFile";
            datasource.Attributes.ItemType    = "";

            return(node);
        }
Esempio n. 2
0
        private dynamic InitXaml() {
            dynamic node = new DynamicNode("ProjectSchemaDefinitions", "clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework");
            var rule = node.Add("Rule");

            rule.Attributes.Name = "ReferencedPackages{0}".format(Guid.NewGuid());
            rule.Attributes.PageTemplate = "tool";
            rule.Attributes.DisplayName = "Referenced Packages";
            rule.Attributes.SwitchPrefix = "/";
            rule.Attributes.Order = "1";

            var categories = rule.Add("Rule.Categories");
            var category = categories.Add("Category");
            category.Attributes.Name = _pkgName;
            category.Attributes.DisplayName = _pkgName;

            var datasources = rule.Add("Rule.DataSource");
            var datasource = datasources.Add("DataSource");
            datasource.Attributes.Persistence = "ProjectFile";
            datasource.Attributes.ItemType = "";

            return node;
        }