コード例 #1
0
        public static AggregateDictionary ForHttpContext(HttpContextWrapper context)
        {
            var dict = new AggregateDictionary();
            dict.configureForRequest(context);

            return dict;
        }
コード例 #2
0
 public static RequestData ForDictionary(IDictionary<string, object> dictionary)
 {
     AggregateDictionary dict = new AggregateDictionary().AddDictionary(dictionary);
     return new RequestData(dict);
 }
コード例 #3
0
 public RequestData(AggregateDictionary dictionary)
 {
     _dictionary = dictionary;
 }
コード例 #4
0
        public void SetUp()
        {
            callback = MockRepository.GenerateMock<IDictionaryCallback>();

            dict1 = new Dictionary<string, object>
            {
                {"a", 1},
                {"b", 2},
                {"c", 3}
            };

            dict2 = new Dictionary<string, object>
            {
                {"d", 4},
                {"e", 5},
                {"f", 6}
            };

            dict3 = new Dictionary<string, object>
            {
                {"g", 7},
                {"h", 8},
                {"i", 9}
            };

            aggregate = new AggregateDictionary();
            aggregate.AddLocator(RequestDataSource.Route, key => dict1.ContainsKey(key) ? dict1[key] : null);
            aggregate.AddLocator(RequestDataSource.Request, key => dict2.ContainsKey(key) ? dict2[key] : null);
            aggregate.AddLocator(RequestDataSource.Header, key => dict3.ContainsKey(key) ? dict3[key] : null);
        }
コード例 #5
0
 public RecordingRequestData(IDebugReport report, AggregateDictionary dictionary)
     : base(dictionary)
 {
     _report = report;
 }