Renaming OrchardDependencyReplaceAttribute to OrchardSuppressDependencyAttribute.

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2011-03-21 13:00:38 -07:00
parent 6a4e5f1c34
commit 2b5001be0f
3 changed files with 8 additions and 8 deletions
@@ -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);
} }
} }
} }