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

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