Example #1
0
 public static DispatchContext Dispatch(this RestContext ctx)
 {
     if (ctx == null) return null;
     var storage = ctx.Native.Items;
     var key = "XenoGears.RestContext.DispatchContext";
     if (!storage.Contains(key)) storage[key] = new DispatchContext(ctx.Request);
     return (DispatchContext)storage[key];
 }
Example #2
0
        public static DispatchContext Dispatch(this RestContext ctx)
        {
            if (ctx == null)
            {
                return(null);
            }
            var storage = ctx.Native.Items;
            var key     = "XenoGears.RestContext.DispatchContext";

            if (!storage.Contains(key))
            {
                storage[key] = new DispatchContext(ctx.Request);
            }
            return((DispatchContext)storage[key]);
        }