Example #1
0
            public int AddOrSet(String key, String value)
            {
                try
                {
                    if (String.IsNullOrEmpty(key))
                    {
                        return(-1);
                    }

                    if (NativeDictionary.ContainsKey(key))
                    {
                        NativeDictionary[key] = value;
                    }
                    else
                    {
                        NativeDictionary.Add(key, value);
                    }

                    return(Count - 1);
                }
                catch (Exception ex)
                {
                    ILog.LogError(ex);
                }
                return(-1);
            }