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]; }
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]); }