protected ListRepresentation(IOidStrategy oidStrategy, IMenuFacade[] menus, HttpRequestMessage req, RestControlFlags flags) : base(oidStrategy, flags) { Value = menus.Where(m => m.MenuItems.Any()).Select(c => CreateMenuLink(oidStrategy, req, c)).ToArray(); SelfRelType = new ListRelType(RelValues.Self, SegmentValues.Services, new UriMtHelper(oidStrategy, req)); SetLinks(req); SetExtensions(); SetHeader(true); }
protected ListRepresentation(IOidStrategy oidStrategy, ListContextFacade listContext, HttpRequestMessage req, RestControlFlags flags) : base(oidStrategy, flags) { Value = listContext.List.Select(c => CreateObjectLink(oidStrategy, req, c)).ToArray(); SelfRelType = new ListRelType(RelValues.Self, SegmentValues.Services, new UriMtHelper(oidStrategy, req, listContext.ElementType)); SetLinks(req); SetExtensions(); SetHeader(listContext.IsListOfServices); }