當前位置: 首頁>>代碼示例>>C#>>正文


C# HttpRequestMessage.ResolveLink方法代碼示例

本文整理匯總了C#中System.Net.Http.HttpRequestMessage.ResolveLink方法的典型用法代碼示例。如果您正苦於以下問題:C# HttpRequestMessage.ResolveLink方法的具體用法?C# HttpRequestMessage.ResolveLink怎麽用?C# HttpRequestMessage.ResolveLink使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Net.Http.HttpRequestMessage的用法示例。


在下文中一共展示了HttpRequestMessage.ResolveLink方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetCollection

        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;
        }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:14,代碼來源:TopicsLinkHelper.cs

示例2: CreateLink

 public static SessionLink CreateLink(HttpRequestMessage request, Session session)
 {
     return request.ResolveLink<SessionLink>(SessionByIdRoute, new { id = session.Id});
 }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:4,代碼來源:SessionLinkHelper.cs

示例3: CreateLink

 public static SessionsLink CreateLink(HttpRequestMessage request, Topic topic)
 {
     return request.ResolveLink<SessionsLink>(TopicSessionsRoute, new { id = topic.Id });
 }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:4,代碼來源:SessionsLinkHelper.cs

示例4: CreateLink

 public static DaysLink CreateLink(HttpRequestMessage request)
 {
     return request.ResolveLink<DaysLink>(AllDaysRoute);
 }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:4,代碼來源:DaysLinkHelper.cs

示例5: CreateLink

 public static TopicLink CreateLink(HttpRequestMessage request, Topic session)
 {
     return request.ResolveLink<TopicLink>(TopicByIdRoute, new { id = session.Id});
 }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:4,代碼來源:TopicLinkHelper.cs

示例6: CreateLink

 public static SpeakersLink CreateLink(HttpRequestMessage request)
 {
     return request.ResolveLink<SpeakersLink>(SpeakersSearchRoute, "{?speakername}");
 }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:4,代碼來源:SpeakersLinkHelper.cs

示例7: CreateLink

 public static SpeakerLink CreateLink(HttpRequestMessage request, int speakerId)
 {
     return request.ResolveLink<SpeakerLink>(SpeakerByIdRoute, new { id = speakerId });
 }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:4,代碼來源:SpeakerLinkHelper.cs

示例8: CreateLink

 public static TopicsLink CreateLink(HttpRequestMessage request,  Session session)
 {
     return request.ResolveLink<TopicsLink>(SessionTopicsRoute, new { id = session.Id });
 }
開發者ID:mehuledu,項目名稱:ndc,代碼行數:4,代碼來源:TopicsLinkHelper.cs


注:本文中的System.Net.Http.HttpRequestMessage.ResolveLink方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。