-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5748 from umbraco/v8/feature/mb-embed-prepare
Prepare MB future
- Loading branch information
Showing
15 changed files
with
115 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Umbraco.Core.Manifest | ||
{ | ||
/// <summary> | ||
/// Provides filtering for package manifests. | ||
/// </summary> | ||
public interface IManifestFilter | ||
{ | ||
/// <summary> | ||
/// Filters package manifests. | ||
/// </summary> | ||
/// <param name="manifests">The package manifests.</param> | ||
/// <remarks> | ||
/// <para>It is possible to remove, change, or add manifests.</para> | ||
/// </remarks> | ||
void Filter(List<PackageManifest> manifests); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Collections.Generic; | ||
using Umbraco.Core.Composing; | ||
|
||
namespace Umbraco.Core.Manifest | ||
{ | ||
/// <summary> | ||
/// Contains the manifest filters. | ||
/// </summary> | ||
public class ManifestFilterCollection : BuilderCollectionBase<IManifestFilter> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ManifestFilterCollection"/> class. | ||
/// </summary> | ||
public ManifestFilterCollection(IEnumerable<IManifestFilter> items) | ||
: base(items) | ||
{ } | ||
|
||
/// <summary> | ||
/// Filters package manifests. | ||
/// </summary> | ||
/// <param name="manifests">The package manifests.</param> | ||
public void Filter(List<PackageManifest> manifests) | ||
{ | ||
foreach (var filter in this) | ||
filter.Filter(manifests); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Umbraco.Core/Manifest/ManifestFilterCollectionBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Umbraco.Core.Composing; | ||
|
||
namespace Umbraco.Core.Manifest | ||
{ | ||
public class ManifestFilterCollectionBuilder : OrderedCollectionBuilderBase<ManifestFilterCollectionBuilder, ManifestFilterCollection, IManifestFilter> | ||
{ | ||
protected override ManifestFilterCollectionBuilder This => this; | ||
|
||
// do NOT cache this, it's only used once | ||
protected override Lifetime CollectionLifetime => Lifetime.Transient; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters