Esempio n. 1
0
        public void RawSet(string Name, string Value, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            if (Name.Trim().Length == 0)
            {
                return;
            }
            string SafeName  = SafeRawMethod(Name);
            string SafeValue = SafeRawMethod(Value);
            string Key       = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);

            if (Key == null)
            {
                ParameterStore[SafeName] = new List <string>()
                {
                    SafeValue
                }
            }
            ;
            else
            {
                ParameterStore[Key] = new List <string>()
                {
                    SafeValue
                }
            };
        }
Esempio n. 2
0
        public void RawSet(string Name, int Position, string Value, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            if (Name.Trim().Length == 0)
            {
                return;
            }
            string SafeName  = SafeRawMethod(Name);
            string SafeValue = SafeRawMethod(Value);

            if (Position < 0)
            {
                return;
            }
            string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);

            if (Key == null)
            {
                ParameterStore[SafeName] = new List <string>()
                {
                    SafeValue
                };
            }
            else
            {
                if (Position >= ParameterStore[Key].Count)
                {
                    this.Add(Key, SafeValue);
                }
                else
                {
                    ParameterStore[Key][Position] = SafeValue;
                }
            }
        }
Esempio n. 3
0
        public void RawRemove(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            string SafeName = SafeRawMethod(Name);
            string Key      = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);

            if (Key != null)
            {
                ParameterStore.Remove(Key);
            }
        }
Esempio n. 4
0
        public bool RawHas(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            string SafeName = SafeRawMethod(Name);
            string Key      = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);

            if (Key == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Esempio n. 5
0
        public List <string> RawGetAll(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            string SafeName = SafeRawMethod(Name);
            string Key      = MatchAndGetKey(Name, EncodeMethod, DecodeMethod);

            if (Key == null)
            {
                throw new Exception("Parameter not found");
            }
            else
            {
                return(new List <string>(ParameterStore[Key]));
            }
        }
Esempio n. 6
0
        public string RawGet(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            string SafeName = SafeRawMethod(Name);
            string Key      = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);

            if (Key == null)
            {
                throw new Exception("Parameter not found");
            }
            else
            {
                List <string> Values = ParameterStore[Key];
                return(Values[0]);
            }
        }
Esempio n. 7
0
        public void RawAdd(string Name, string Value, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            if (Name.Trim().Length == 0)
            {
                return;
            }
            string SafeName  = SafeRawMethod(Name);
            string SafeValue = SafeRawMethod(Value);
            string Key       = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);

            if (Key == null)
            {
                List <string> Values = new List <string>();
                Values.Add(SafeValue);
                ParameterStore.Add(SafeName, Values);
            }
            else
            {
                ParameterStore[Key].Add(SafeValue);
            }
        }
Esempio n. 8
0
        public void RawSet(string Name, List <string> Values, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
        {
            if (Name.Trim().Length == 0)
            {
                return;
            }
            string        SafeName   = SafeRawMethod(Name);
            List <string> SafeValues = new List <string>();

            foreach (string Value in Values)
            {
                SafeValues.Add(SafeRawMethod(Value));
            }
            string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);

            if (Key == null)
            {
                ParameterStore.Add(SafeName, SafeValues);
            }
            else
            {
                ParameterStore[Key] = SafeValues;
            }
        }
Esempio n. 9
0
 public void RawSet(string Name, List<string> Values, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     if (Name.Trim().Length == 0) return;
     string SafeName = SafeRawMethod(Name);
     List<string> SafeValues = new List<string>();
     foreach (string Value in Values)
     {
         SafeValues.Add(SafeRawMethod(Value));
     }
     string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);
     if (Key == null)
     {
         ParameterStore.Add(SafeName, SafeValues);
     }
     else
     {
         ParameterStore[Key] = SafeValues;
     }
 }
Esempio n. 10
0
 public void RawSet(string Name, int Position, string Value, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     if (Name.Trim().Length == 0) return;
     string SafeName = SafeRawMethod(Name);
     string SafeValue = SafeRawMethod(Value);
     if (Position < 0) return;
     string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);
     if (Key == null)
     {
         ParameterStore[SafeName] = new List<string>() { SafeValue };
     }
     else
     {
         if (Position >= ParameterStore[Key].Count)
         {
             this.Add(Key, SafeValue);
         }
         else
         {
             ParameterStore[Key][Position] = SafeValue;
         }
     }
 }
Esempio n. 11
0
 public void RawSet(string Name, string Value, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     if (Name.Trim().Length == 0) return;
     string SafeName = SafeRawMethod(Name);
     string SafeValue = SafeRawMethod(Value);
     string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);
     if(Key == null)
         ParameterStore[SafeName] = new List<string>() { SafeValue };
     else
         ParameterStore[Key] = new List<string>() { SafeValue };
 }
Esempio n. 12
0
 public void RawRemove(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     string SafeName = SafeRawMethod(Name);
     string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);
     if (Key != null)
     {
         ParameterStore.Remove(Key);
     }
 }
Esempio n. 13
0
 public bool RawHas(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     string SafeName = SafeRawMethod(Name);
     string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);
     if (Key == null)
     {
         return false;
     }
     else
     {
         return true;
     }
 }
Esempio n. 14
0
 public List<string> RawGetAll(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     string SafeName = SafeRawMethod(Name);
     string Key = MatchAndGetKey(Name, EncodeMethod, DecodeMethod);
     if (Key == null)
     {
         throw new Exception("Parameter not found");
     }
     else
     {
         return new List<string>(ParameterStore[Key]);
     }
 }
Esempio n. 15
0
 public string RawGet(string Name, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     string SafeName = SafeRawMethod(Name);
     string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);
     if (Key == null)
     {
         throw new Exception("Parameter not found");
     }
     else
     {
         List<string> Values = ParameterStore[Key];
         return Values[0];
     }
 }
Esempio n. 16
0
 public void RawAdd(string Name, string Value, SafeRawDelegate SafeRawMethod, EncodeDelegate EncodeMethod, DecodeDelegate DecodeMethod)
 {
     if (Name.Trim().Length == 0) return;
     string SafeName = SafeRawMethod(Name);
     string SafeValue = SafeRawMethod(Value);
     string Key = MatchAndGetKey(SafeName, EncodeMethod, DecodeMethod);
     if (Key == null)
     {
         List<string> Values = new List<string>();
         Values.Add(SafeValue);
         ParameterStore.Add(SafeName, Values);
     }
     else
     {
         ParameterStore[Key].Add(SafeValue);
     }
 }