Esempio n. 1
0
        public Task <IViewFactory> GetView(NoomRequest request)
        {
            NoomParameters parameters   = path.GetParameters(request);
            NoomRequest    parametrized = new NoomRequest(request, parameters);

            return(handler.Invoke(parametrized));
        }
Esempio n. 2
0
        public NoomRequest(string path, object payload)
        {
            this.payload    = payload;
            this.parameters = new NoomParameters();

            parts = path.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);

            for (int i = 0; i < parts.Length; i++)
            {
                parts[i] = "/" + parts[i];
            }

            if (parts.Length == 0)
            {
                parts = new[] { "/" };
            }
        }
Esempio n. 3
0
            public override void Collect(NoomParameters parameters, string value)
            {
                string name = capture.Value.Substring(2, capture.Value.Length - 3);

                parameters.Add(name, value.Substring(1));
            }
Esempio n. 4
0
 public override void Collect(NoomParameters parameters, string value)
 {
 }
Esempio n. 5
0
 public abstract void Collect(NoomParameters parameters, string value);
Esempio n. 6
0
 public NoomRequest(NoomRequest request, NoomParameters parameters)
 {
     this.parameters = parameters;
     this.parts      = request.parts;
     this.payload    = request.payload;
 }