mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Renaming OrchardDependencyReplaceAttribute to OrchardSuppressDependencyAttribute.
--HG-- branch : dev
This commit is contained in:
@@ -313,13 +313,13 @@ namespace Orchard.Tests.Environment {
|
||||
Assert.That(blueprint.Dependencies.FirstOrDefault(dependency => dependency.Type.Equals(typeof(StubNestedType))), Is.Not.Null);
|
||||
}
|
||||
|
||||
[OrchardDependencyReplace("Orchard.Tests.Environment.DefaultCompositionStrategyTests+ReplacedStubNestedType")]
|
||||
[OrchardSuppressDependency("Orchard.Tests.Environment.DefaultCompositionStrategyTests+ReplacedStubNestedType")]
|
||||
internal class StubNestedType : IDependency {}
|
||||
|
||||
internal class ReplacedStubNestedType : IDependency {}
|
||||
}
|
||||
|
||||
[OrchardDependencyReplace("Orchard.Tests.Environment.ReplacedStubType")]
|
||||
[OrchardSuppressDependency("Orchard.Tests.Environment.ReplacedStubType")]
|
||||
internal class StubType : IDependency { }
|
||||
|
||||
internal class ReplacedStubType : IDependency { }
|
||||
|
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace Orchard.Environment.Extensions {
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||
public class OrchardDependencyReplaceAttribute : Attribute {
|
||||
public OrchardDependencyReplaceAttribute(string dependency) {
|
||||
Dependency = dependency;
|
||||
public class OrchardSuppressDependencyAttribute : Attribute {
|
||||
public OrchardSuppressDependencyAttribute(string fullName) {
|
||||
FullName = fullName;
|
||||
}
|
||||
|
||||
public string Dependency { get; set; }
|
||||
public string FullName { get; set; }
|
||||
}
|
||||
}
|
@@ -77,8 +77,8 @@ namespace Orchard.Environment.ShellBuilders {
|
||||
// Identify replaced types
|
||||
foreach(Feature feature in features) {
|
||||
foreach (Type type in feature.ExportedTypes) {
|
||||
foreach (OrchardDependencyReplaceAttribute replacedType in type.GetCustomAttributes(typeof(OrchardDependencyReplaceAttribute), false)) {
|
||||
excludedTypes.Add(replacedType.Dependency);
|
||||
foreach (OrchardSuppressDependencyAttribute replacedType in type.GetCustomAttributes(typeof(OrchardSuppressDependencyAttribute), false)) {
|
||||
excludedTypes.Add(replacedType.FullName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user