public static Collection GetCollection(IEnumerable<Topic> topics, HttpRequestMessage request) { var eventsCollection = new Collection(); foreach (var topic in topics) { var item = new Item(); item.Href = request.ResolveLink<TopicLink>(TopicLinkHelper.TopicByIdRoute, new { id = topic.Id }).Target; item.Data.Add(new Data { Name = "Title", Value = topic.Name }); item.Links.Add(SessionsLinkHelper.CreateLink(request,topic).ToCJLink()); eventsCollection.Items.Add(item); } return eventsCollection; }
public static SessionLink CreateLink(HttpRequestMessage request, Session session) { return request.ResolveLink<SessionLink>(SessionByIdRoute, new { id = session.Id}); }
public static SessionLink CreateLink(HttpRequestMessage request) { return request.ResolveLink<SessionLink>(SessionByTitleRoute, "{?title}"); }
public static SessionsLink CreateLink(HttpRequestMessage request, Topic topic) { return request.ResolveLink<SessionsLink>(TopicSessionsRoute, new { id = topic.Id }); }
public static SessionsLink CreateLink(HttpRequestMessage request, Speaker speaker) { return request.ResolveLink<SessionsLink>(SpeakerSessionsRoute, new { id = speaker.Id }); }
public static SessionsLink CreateLink(HttpRequestMessage request, int dayno) { return request.ResolveLink<SessionsLink>(SessionsSearchRoute, new { dayno }); }
public static SessionsLink CreateLink(HttpRequestMessage request, string speakername) { return request.ResolveLink<SessionsLink>(SessionsSearchRoute, new { speakername }); }
public static SessionsLink CreateLink(HttpRequestMessage request) { var link = request.ResolveLink<SessionsLink>(SessionsSearchRoute, "{?dayno,keyword,speakername}"); return link; }
public static DaysLink CreateLink(HttpRequestMessage request) { return request.ResolveLink<DaysLink>(AllDaysRoute); }
public static TopicLink CreateLink(HttpRequestMessage request, Topic session) { return request.ResolveLink<TopicLink>(TopicByIdRoute, new { id = session.Id}); }
public static SpeakersLink CreateLink(HttpRequestMessage request) { return request.ResolveLink<SpeakersLink>(SpeakersSearchRoute, "{?speakername}"); }
public static SpeakerLink CreateLink(HttpRequestMessage request, int speakerId) { return request.ResolveLink<SpeakerLink>(SpeakerByIdRoute, new { id = speakerId }); }
public static TopicsLink CreateLink(HttpRequestMessage request, Session session) { return request.ResolveLink<TopicsLink>(SessionTopicsRoute, new { id = session.Id }); }
public static TopicsLink CreateLink(HttpRequestMessage request, int dayno) { return request.ResolveLink<TopicsLink>(TopicsSearchRoute, new { dayno }); }
public static TopicsLink CreateLink(HttpRequestMessage request) { return request.ResolveLink<TopicsLink>(TopicsSearchRoute); }