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