|
@@ -1,13 +1,11 @@
|
|
|
-using Newtonsoft.Json;
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
+using System.Collections.Generic;
|
|
|
|
|
|
namespace Vit.Extensions
|
|
|
{
|
|
|
- public static partial class DictionaryExtensions
|
|
|
+ public static partial class IDictionaryExtensions
|
|
|
{
|
|
|
|
|
|
- #region TryAdd
|
|
|
+ #region IDictionaryTryAdd
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
@@ -18,7 +16,7 @@ namespace Vit.Extensions
|
|
|
/// <param name="key"></param>
|
|
|
/// <param name="value"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> data, TKey key, TValue value)
|
|
|
+ public static bool IDictionaryTryAdd<TKey, TValue>(this IDictionary<TKey, TValue> data, TKey key, TValue value)
|
|
|
{
|
|
|
if (data == null || data.ContainsKey(key))
|
|
|
{
|