Skip to content

Commit

Permalink
Add DeploymentStepDriverBase
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed Oct 12, 2024
1 parent 2ce75ef commit d0600f9
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 284 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@

namespace OrchardCore.Deployment.Steps;

public sealed class CustomFileDeploymentStepDriver : DisplayDriver<DeploymentStep, CustomFileDeploymentStep>
public sealed class CustomFileDeploymentStepDriver
: DeploymentStepDriverBase<CustomFileDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(CustomFileDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("CustomFileDeploymentStep_Fields_Summary", step).Location("Summary", "Content"),
View("CustomFileDeploymentStep_Fields_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(CustomFileDeploymentStep step, BuildEditorContext context)
{
return Initialize<CustomFileDeploymentStepViewModel>("CustomFileDeploymentStep_Fields_Edit", model =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@

namespace OrchardCore.Deployment.Steps;

public sealed class RecipeFileDeploymentStepDriver : DisplayDriver<DeploymentStep, RecipeFileDeploymentStep>
public sealed class RecipeFileDeploymentStepDriver
: DeploymentStepDriverBase<RecipeFileDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(RecipeFileDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("RecipeFileDeploymentStep_Fields_Summary", step).Location("Summary", "Content"),
View("RecipeFileDeploymentStep_Fields_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(RecipeFileDeploymentStep step, BuildEditorContext context)
{
return Initialize<RecipeFileDeploymentStepViewModel>("RecipeFileDeploymentStep_Fields_Edit", model =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Facebook.Deployment;

public sealed class FacebookLoginDeploymentStepDriver : DisplayDriver<DeploymentStep, FacebookLoginDeploymentStep>
public sealed class FacebookLoginDeploymentStepDriver
: DeploymentStepDriverBase<FacebookLoginDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(FacebookLoginDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("FacebookLoginDeploymentStep_Summary", step).Location("Summary", "Content"),
View("FacebookLoginDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(FacebookLoginDeploymentStep step, BuildEditorContext context)
{
return View("FacebookLoginDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@

namespace OrchardCore.Features.Deployment;

public sealed class AllFeaturesDeploymentStepDriver : DisplayDriver<DeploymentStep, AllFeaturesDeploymentStep>
public sealed class AllFeaturesDeploymentStepDriver
: DeploymentStepFieldsDriverBase<AllFeaturesDeploymentStep>

Check failure on line 9 in src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentStepDriver.cs

View workflow job for this annotation

GitHub Actions / Build & Test (ubuntu-latest)

The type or namespace name 'DeploymentStepFieldsDriverBase<>' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 9 in src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentStepDriver.cs

View workflow job for this annotation

GitHub Actions / Build & Test (ubuntu-latest)

The type or namespace name 'DeploymentStepFieldsDriverBase<>' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 9 in src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentStepDriver.cs

View workflow job for this annotation

GitHub Actions / Build & Test (windows-latest)

The type or namespace name 'DeploymentStepFieldsDriverBase<>' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 9 in src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentStepDriver.cs

View workflow job for this annotation

GitHub Actions / Build & Test (windows-latest)

The type or namespace name 'DeploymentStepFieldsDriverBase<>' could not be found (are you missing a using directive or an assembly reference?)
{
public override Task<IDisplayResult> DisplayAsync(AllFeaturesDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllFeaturesDeploymentStep_Fields_Summary", step).Location("Summary", "Content"),
View("AllFeaturesDeploymentStep_Fields_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllFeaturesDeploymentStep step, BuildEditorContext context)
{
return Initialize<AllFeaturesDeploymentStepViewModel>("AllFeaturesDeploymentStep_Fields_Edit", model =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Layers.Deployment;

public sealed class AllLayersDeploymentStepDriver : DisplayDriver<DeploymentStep, AllLayersDeploymentStep>
public sealed class AllLayersDeploymentStepDriver
: DeploymentStepDriverBase<AllLayersDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllLayersDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllLayersDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllLayersDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllLayersDeploymentStep step, BuildEditorContext context)
{
return View("AllLayersDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Media.Deployment;

public sealed class AllMediaProfilesDeploymentStepDriver : DisplayDriver<DeploymentStep, AllMediaProfilesDeploymentStep>
public sealed class AllMediaProfilesDeploymentStepDriver
: DeploymentStepDriverBase<AllMediaProfilesDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllMediaProfilesDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllMediaProfilesDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllMediaProfilesDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllMediaProfilesDeploymentStep step, BuildEditorContext context)
{
return View("AllMediaProfilesDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Microsoft.Authentication.Deployment;

public sealed class AzureADDeploymentStepDriver : DisplayDriver<DeploymentStep, AzureADDeploymentStep>
public sealed class AzureADDeploymentStepDriver
: DeploymentStepDriverBase<AzureADDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AzureADDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AzureADDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AzureADDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AzureADDeploymentStep step, BuildEditorContext context)
{
return View("AzureADDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Microsoft.Authentication.Deployment;

public sealed class MicrosoftAccountDeploymentStepDriver : DisplayDriver<DeploymentStep, MicrosoftAccountDeploymentStep>
public sealed class MicrosoftAccountDeploymentStepDriver
: DeploymentStepDriverBase<MicrosoftAccountDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(MicrosoftAccountDeploymentStep step, BuildDisplayContext context)
{
return CombineAsync(
View("MicrosoftAccountDeploymentStep_Summary", step).Location("Summary", "Content"),
View("MicrosoftAccountDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(MicrosoftAccountDeploymentStep step, BuildEditorContext context)
=> View("MicrosoftAccountDeploymentStep_Edit", step).Location("Content");
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.OpenId.Deployment;

public sealed class OpenIdServerDeploymentStepDriver : DisplayDriver<DeploymentStep, OpenIdServerDeploymentStep>
public sealed class OpenIdServerDeploymentStepDriver
: DeploymentStepDriverBase<OpenIdServerDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(OpenIdServerDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("OpenIdServerDeploymentStep_Summary", step).Location("Summary", "Content"),
View("OpenIdServerDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(OpenIdServerDeploymentStep step, BuildEditorContext context)
{
return View("OpenIdServerDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.OpenId.Deployment;

public sealed class OpenIdValidationDeploymentStepDriver : DisplayDriver<DeploymentStep, OpenIdValidationDeploymentStep>
public sealed class OpenIdValidationDeploymentStepDriver
: DeploymentStepDriverBase<OpenIdValidationDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(OpenIdValidationDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("OpenIdValidationDeploymentStep_Summary", step).Location("Summary", "Content"),
View("OpenIdValidationDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(OpenIdValidationDeploymentStep step, BuildEditorContext context)
{
return View("OpenIdValidationDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Placements.Deployment;

public sealed class PlacementsDeploymentStepDriver : DisplayDriver<DeploymentStep, PlacementsDeploymentStep>
public sealed class PlacementsDeploymentStepDriver
: DeploymentStepDriverBase<PlacementsDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(PlacementsDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("PlacementsDeploymentStep_Summary", step).Location("Summary", "Content"),
View("PlacementsDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(PlacementsDeploymentStep step, BuildEditorContext context)
{
return View("PlacementsDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Queries.Deployment;

public sealed class AllQueriesDeploymentStepDriver : DisplayDriver<DeploymentStep, AllQueriesDeploymentStep>
public sealed class AllQueriesDeploymentStepDriver
: DeploymentStepDriverBase<AllQueriesDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllQueriesDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllQueriesDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllQueriesDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllQueriesDeploymentStep step, BuildEditorContext context)
{
return View("AllQueriesDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Roles.Deployment;

public sealed class AllRolesDeploymentStepDriver : DisplayDriver<DeploymentStep, AllRolesDeploymentStep>
public sealed class AllRolesDeploymentStepDriver
: DeploymentStepDriverBase<AllRolesDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllRolesDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllRolesDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllRolesDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllRolesDeploymentStep step, BuildEditorContext context)
{
return View("AllRolesDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Shortcodes.Deployment;

public sealed class AllShortcodeTemplatesDeploymentStepDriver : DisplayDriver<DeploymentStep, AllShortcodeTemplatesDeploymentStep>
public sealed class AllShortcodeTemplatesDeploymentStepDriver
: DeploymentStepDriverBase<AllShortcodeTemplatesDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllShortcodeTemplatesDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllShortcodeTemplatesDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllShortcodeTemplatesDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllShortcodeTemplatesDeploymentStep step, BuildEditorContext context)
{
return View("AllShortcodeTemplatesDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
using OrchardCore.Deployment;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.Sitemaps.Deployment;

public sealed class AllSitemapsDeploymentStepDriver : DisplayDriver<DeploymentStep, AllSitemapsDeploymentStep>
public sealed class AllSitemapsDeploymentStepDriver
: DeploymentStepDriverBase<AllSitemapsDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllSitemapsDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllSitemapsDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllSitemapsDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllSitemapsDeploymentStep step, BuildEditorContext context)
{
return View("AllSitemapsDeploymentStep_Edit", step).Location("Content");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@

namespace OrchardCore.Templates.Deployment;

public sealed class AllAdminTemplatesDeploymentStepDriver : DisplayDriver<DeploymentStep, AllAdminTemplatesDeploymentStep>
public sealed class AllAdminTemplatesDeploymentStepDriver
: DeploymentStepDriverBase<AllAdminTemplatesDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllAdminTemplatesDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllAdminTemplatesDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllAdminTemplatesDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllAdminTemplatesDeploymentStep step, BuildEditorContext context)
{
return Initialize<AllAdminTemplatesDeploymentStepViewModel>("AllAdminTemplatesDeploymentStep_Fields_Edit", model =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@

namespace OrchardCore.Templates.Deployment;

public sealed class AllTemplatesDeploymentStepDriver : DisplayDriver<DeploymentStep, AllTemplatesDeploymentStep>
public sealed class AllTemplatesDeploymentStepDriver
: DeploymentStepDriverBase<AllTemplatesDeploymentStep>
{
public override Task<IDisplayResult> DisplayAsync(AllTemplatesDeploymentStep step, BuildDisplayContext context)
{
return
CombineAsync(
View("AllTemplatesDeploymentStep_Summary", step).Location("Summary", "Content"),
View("AllTemplatesDeploymentStep_Thumbnail", step).Location("Thumbnail", "Content")
);
}

public override IDisplayResult Edit(AllTemplatesDeploymentStep step, BuildEditorContext context)
{
return Initialize<AllTemplatesDeploymentStepViewModel>("AllTemplatesDeploymentStep_Fields_Edit", model =>
Expand Down
Loading

0 comments on commit d0600f9

Please sign in to comment.