Deprecated many of the classes for Dynamics in the macro engines project and proxied these calls

to the superceded classes.
This commit is contained in:
Shannon Deminick
2012-08-17 06:22:51 +06:00
parent 5213d6de5c
commit 3da387591d
17 changed files with 336 additions and 728 deletions

View File

@@ -52,10 +52,10 @@ namespace Umbraco.Core.Dynamics
return all.Items.OrderBy(x => Guid.NewGuid()).First();
}
public static bool ContainsAny(this string haystack, List<string> needles)
public static bool ContainsAny(this string haystack, IEnumerable<string> needles)
{
if (haystack == null) throw new ArgumentNullException("haystack");
if (!string.IsNullOrEmpty(haystack) || needles.Count > 0)
if (!string.IsNullOrEmpty(haystack) || needles.Any())
{
return needles.Any(haystack.Contains);
}
@@ -70,10 +70,10 @@ namespace Umbraco.Core.Dynamics
}
return false;
}
public static bool ContainsAny(this string haystack, StringComparison comparison, List<string> needles)
public static bool ContainsAny(this string haystack, StringComparison comparison, IEnumerable<string> needles)
{
if (haystack == null) throw new ArgumentNullException("haystack");
if (!string.IsNullOrEmpty(haystack) || needles.Count > 0)
if (!string.IsNullOrEmpty(haystack) || needles.Any())
{
return needles.Any(value => haystack.IndexOf(value, comparison) >= 0);
}