public ScaffolderTemplateSelectPage(ScaffolderArgs args) : base(args)
 {
     this.PageSubtitle = "Select Scaffolder";
     this.PageIcon     = StockIcons.Question;
     this.SubSubTitle  = "Select Scaffolder";
     this.args         = args;
 }
Ejemplo n.º 2
0
        internal string GetArguments(ScaffolderArgs args)
        {
            var argBuilder = new ProcessArgumentBuilder();

            argBuilder.Add("aspnet-codegenerator");
            argBuilder.Add("--project");
            argBuilder.AddQuoted(project.FileName);
            argBuilder.Add(args.Scaffolder.CommandLineName);

            foreach (var field in args.Scaffolder.Fields)
            {
                argBuilder.Add(field.CommandLineName);
                argBuilder.Add(field.SelectedValue);
            }

            argBuilder.Add("--no-build");
            argBuilder.Add("-outDir");
            argBuilder.AddQuoted(parentFolder);

            foreach (var arg in args.Scaffolder.DefaultArgs)
            {
                argBuilder.Add(arg.ToString());
            }

            return(argBuilder.ToString());
        }
 ScaffolderTemplateConfigurePage GetConfigurePage(ScaffolderArgs args, CancellationToken token)
 {
     // we want to return the same instance for the same args
     if (cachedPages.ContainsKey(args))
     {
         return(cachedPages [args]);
     }
     else
     {
         var page = new ScaffolderTemplateConfigurePage(args, token);
         cachedPages.Add(args, page);
         return(page);
     }
 }
Ejemplo n.º 4
0
        public ScaffolderWizard(DotNetProject project, FilePath parentFolder, ScaffolderTemplateSelectPage selectPage, ScaffolderArgs args) : base(GettextCatalog.GetString("Add New Scaffolding"), selectPage, args)
        {
            this.DefaultPageSize = new Size(500, 400);

            var rightSideImage  = new Xwt.ImageView(Image.FromResource("aspnet-wizard-page.png"));
            var rightSideWidget = new FrameBox(rightSideImage);

            rightSideWidget.BackgroundColor = Styles.Wizard.PageBackgroundColor;
            this.RightSideWidget            = new XwtControl(rightSideWidget);
            this.project      = project;
            this.parentFolder = parentFolder;
            this.args         = args;
            args.Project      = project;
            args.ParentFolder = parentFolder;

            this.Completed += (_, __) => Task.Run(() => OnCompletedAsync());
            selectPage.ScaffolderSelected -= ScaffolderSelected;
            selectPage.ScaffolderSelected += ScaffolderSelected;
        }
Ejemplo n.º 5
0
 public MvcControllerWithActionsScaffolder(ScaffolderArgs args) : base(args)
 {
     DefaultArgs.Add(new CommandLineArg("--readWriteActions"));
 }
 public ScaffolderDialogController(string title, IWizardDialogPage firstPage, ScaffolderArgs args)
     : base(title, null, null, firstPage)
 {
     this.firstPage = firstPage;
     this.args      = args;
 }
Ejemplo n.º 7
0
 public EmptyApiControllerScaffolder(ScaffolderArgs args) : base(args)
 {
     DefaultArgs.Add(new CommandLineArg("--restWithNoViews"));
 }
Ejemplo n.º 8
0
 public RazorPageEntityFrameworkScaffolder(ScaffolderArgs args) : base(args)
 {
     this.args = args;
 }
        public RazorPageScaffolderBase(ScaffolderArgs args)
        {
            var defaultNamespace = args.ParentFolder.Combine("file.cs");

            DefaultArgs.Add(new CommandLineArg("--namespaceName", args.Project.GetDefaultNamespace(defaultNamespace)));
        }
Ejemplo n.º 10
0
 public ScaffolderTemplateConfigurePage(ScaffolderArgs args, CancellationToken token) : base(args)
 {
     scaffolder             = args.Scaffolder;
     SubSubTitle            = scaffolder.Name;
     args.CancellationToken = token;
 }
Ejemplo n.º 11
0
 protected ComboField GetDbContextField(ScaffolderArgs args)
 {
     return(new ComboField("--dataContext", GettextCatalog.GetString("DbContext class to use:"), GetDbContextClassesAsync(args.Project, args.CancellationToken), isEditable: true, placeholderText: "Select or type DbContext class name"));
 }
Ejemplo n.º 12
0
 public RazorPageScaffolder(ScaffolderArgs args) : base(args)
 {
 }
Ejemplo n.º 13
0
 protected ScaffolderWizardPageBase(ScaffolderArgs args)
 {
     Args      = args;
     CanGoBack = true;
     CanGoNext = true;
 }
Ejemplo n.º 14
0
 public ScaffolderTemplateSelectPage(ScaffolderArgs args) : base(args)
 {
     SubSubTitle = GettextCatalog.GetString("Select Scaffolder");
     this.args   = args;
 }
Ejemplo n.º 15
0
 protected ComboField GetModelField(ScaffolderArgs args)
 {
     return(new ComboField("--model", "Model class to use", GetModelClassesAsync(args.Project, args.CancellationToken), isEditable: true));
 }
Ejemplo n.º 16
0
 protected ComboField GetDbContextField(ScaffolderArgs args)
 {
     return(new ComboField("--dataContext", "DbContext class to use", GetDbContextClassesAsync(args.Project, args.CancellationToken), isEditable: true));
 }
 public ApiControllerEntityFrameworkScaffolder(ScaffolderArgs args) : base(args)
 {
     this.args = args;
 }
 public EmptyMvcControllerScaffolder(ScaffolderArgs args) : base(args)
 {
 }
 public ApiControllerWithActionsScaffolder(ScaffolderArgs args) : base(args)
 {
     base.DefaultArgs.Add(new CommandLineArg("--restWithNoViews", "--readWriteActions"));
 }