mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +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);
|
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 StubNestedType : IDependency {}
|
||||||
|
|
||||||
internal class ReplacedStubNestedType : IDependency {}
|
internal class ReplacedStubNestedType : IDependency {}
|
||||||
}
|
}
|
||||||
|
|
||||||
[OrchardDependencyReplace("Orchard.Tests.Environment.ReplacedStubType")]
|
[OrchardSuppressDependency("Orchard.Tests.Environment.ReplacedStubType")]
|
||||||
internal class StubType : IDependency { }
|
internal class StubType : IDependency { }
|
||||||
|
|
||||||
internal class ReplacedStubType : IDependency { }
|
internal class ReplacedStubType : IDependency { }
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
namespace Orchard.Environment.Extensions {
|
namespace Orchard.Environment.Extensions {
|
||||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||||||
public class OrchardDependencyReplaceAttribute : Attribute {
|
public class OrchardSuppressDependencyAttribute : Attribute {
|
||||||
public OrchardDependencyReplaceAttribute(string dependency) {
|
public OrchardSuppressDependencyAttribute(string fullName) {
|
||||||
Dependency = dependency;
|
FullName = fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Dependency { get; set; }
|
public string FullName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,8 +77,8 @@ namespace Orchard.Environment.ShellBuilders {
|
|||||||
// Identify replaced types
|
// Identify replaced types
|
||||||
foreach(Feature feature in features) {
|
foreach(Feature feature in features) {
|
||||||
foreach (Type type in feature.ExportedTypes) {
|
foreach (Type type in feature.ExportedTypes) {
|
||||||
foreach (OrchardDependencyReplaceAttribute replacedType in type.GetCustomAttributes(typeof(OrchardDependencyReplaceAttribute), false)) {
|
foreach (OrchardSuppressDependencyAttribute replacedType in type.GetCustomAttributes(typeof(OrchardSuppressDependencyAttribute), false)) {
|
||||||
excludedTypes.Add(replacedType.Dependency);
|
excludedTypes.Add(replacedType.FullName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user