public override void Execute() { // Define the schema elements. var schema = Schemas.AddSchema(BasePluginConstants.DesignModel_SchemaName, BasePluginConstants.DesignModel_SchemaNamespace); var stringType = DataTypeRegistry.Get(BasePluginConstants.DataType_string); schema .CreateRootElement("DesignModels") .CreateElement("Namespace", "Defines namespace for the design models", c => c.IsMandatory = true) .CreateAttribute("name", stringType, "Namespace name", c => c.IsMandatory = true); // Register parser. DesignModelConverterFactory.RegisterFactory(schema.RootElement.FindChildElement("Namespace"), new NamespaceParser()); }
public override void Execute() { var schema = Schemas.AddSchema(CoreConstants.ProjectConfiguration_SchemaName, CoreConstants.ProjectConfiguration_SchemaNamespace); var stringType = DataTypeRegistry.Get(BasePluginConstants.DataType_string); schema .CreateRootElement("ProjectConfiguration") .CreateElement("Solution", "Defines project solution projects", c => c.IsMandatory = true) .CreateAttribute("path", stringType, "Solution path relative to this file", c => c.IsMandatory = true) .CreateElement("Project", "Defines a project", c => c.AllowMultiple = true) .CreateAttribute("name", stringType, "Project name", c => c.IsMandatory = true) .CreateAttribute("path", stringType, "Project location relative to the solution path", c => c.IsMandatory = true) .CreateAttribute("type", stringType, "Project type", c => c.IsMandatory = true) .Parent() .CreateElement("Namespaces", "Defines the namespaces to be used in design models"); DesignModelConverterFactory.RegisterFactory(schema.RootElement, new ProjectConfigurationParser(ProjectCollection)); }