コード例 #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
                }
            };
        }
コード例 #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;
                }
            }
        }
コード例 #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);
            }
        }
コード例 #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);
            }
        }
コード例 #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]));
            }
        }
コード例 #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]);
            }
        }
コード例 #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);
            }
        }
コード例 #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;
            }
        }
コード例 #9
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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;
     }
 }
コード例 #10
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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;
         }
     }
 }
コード例 #11
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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 };
 }
コード例 #12
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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);
     }
 }
コード例 #13
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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;
     }
 }
コード例 #14
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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]);
     }
 }
コード例 #15
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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];
     }
 }
コード例 #16
0
ファイル: Parameters.cs プロジェクト: 0ks3ii/IronWASP
 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);
     }
 }