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

            return(handler.Invoke(parametrized));
        }
Exemple #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[] { "/" };
            }
        }
Exemple #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));
            }
Exemple #4
0
 public override void Collect(NoomParameters parameters, string value)
 {
 }
Exemple #5
0
 public abstract void Collect(NoomParameters parameters, string value);
Exemple #6
0
 public NoomRequest(NoomRequest request, NoomParameters parameters)
 {
     this.parameters = parameters;
     this.parts      = request.parts;
     this.payload    = request.payload;
 }