public RestSnapshot(IOidStrategy oidStrategy, MenuContextFacade menus, HttpRequestMessage req, RestControlFlags flags) : this(oidStrategy, req, true) { populator = () => { Representation = ListRepresentation.Create(oidStrategy, menus, req, flags); SetHeaders(); }; }
protected ListRepresentation(IOidStrategy oidStrategy, MenuContextFacade menus, HttpRequestMessage req, RestControlFlags flags) : base(oidStrategy, flags) { Value = menus.List.Where(m => m.MenuItems.Any()).Select(c => CreateMenuLink(oidStrategy, req, c)).ToArray(); SelfRelType = new ListRelType(RelValues.Self, SegmentValues.Menus, new UriMtHelper(oidStrategy, req, menus.ElementType)); SetLinks(req); SetExtensions(); SetHeader(true); }
public static ListRepresentation Create(IOidStrategy oidStrategy, MenuContextFacade menus, HttpRequestMessage req, RestControlFlags flags) { return new ListRepresentation(oidStrategy, menus, req, flags); }