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

View File

@@ -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 { }

View File

@@ -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; }
}
}

View File

@@ -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);
}
}
}