Normalize cr/lf/tab
This commit is contained in:
@@ -6,8 +6,8 @@ using System.Text;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
internal static class NameValueCollectionExtensions
|
||||
{
|
||||
internal static class NameValueCollectionExtensions
|
||||
{
|
||||
public static IEnumerable<KeyValuePair<string, string>> AsEnumerable(this NameValueCollection nvc)
|
||||
{
|
||||
foreach (string key in nvc.AllKeys)
|
||||
@@ -16,10 +16,10 @@ namespace Umbraco.Core
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ContainsKey(this NameValueCollection collection, string key)
|
||||
{
|
||||
return collection.Keys.Cast<object>().Any(k => (string) k == key);
|
||||
}
|
||||
public static bool ContainsKey(this NameValueCollection collection, string key)
|
||||
{
|
||||
return collection.Keys.Cast<object>().Any(k => (string) k == key);
|
||||
}
|
||||
|
||||
public static T GetValue<T>(this NameValueCollection collection, string key, T defaultIfNotFound)
|
||||
{
|
||||
@@ -35,8 +35,8 @@ namespace Umbraco.Core
|
||||
}
|
||||
|
||||
var result = val.TryConvertTo<T>();
|
||||
|
||||
|
||||
return result.Success ? result.Result : defaultIfNotFound;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user