protected AbstactQuery() { Querystring = new DictHelper.MonoRailDictionary(); PageSize = MRHelper.DefaultPageSize; Page = 1; Type = typeof(T); }
public static string ToCacheKey(this DictHelper.MonoRailDictionary dict) { var list = new System.Collections.Generic.SortedSet <string>(); foreach (var k in dict.Keys) { list.Add(k + "=" + dict[k]); } return(string.Join("&", list)); }
public static IDictionary GetAttributesDictionaryFrom(string attributes) { IDictionary attributesDictionary = new DictHelper.MonoRailDictionary(); var matches = Internal.RegularExpressions.Attributes.Matches(attributes); DoSomethingWithAttributes(matches, delegate(string name, string value) { attributesDictionary.Add(name, value); }); return(attributesDictionary); }
internal static IDictionary ConvertArgumentsToParameters(object[] arguments) { if (arguments.Length % 2 != 0) { throw new AspViewException("Parameters should be arranged as key and value pairs"); } int i = 0; IDictionary parameters = new DictHelper.MonoRailDictionary(); while (i < arguments.Length) { string name = arguments[i] as string; if (name == null) { throw new AspViewException("Parameters should be arranged as key and value pairs"); } object key = arguments[i + 1]; parameters.Add(name, key); i += 2; } return(parameters); }