Пример #1
0
        public static SyndicationFeed GetBuildEventCode()
        {
            string urlOfList = string.Format("{0}{1}/{2}", Framework.Web.WebFormApplicationApplicationVariables.WebAppRootUrl, "BuildEventCode", "WPCommonOfBuildEventCode");

            SyndicationFeed feed = new SyndicationFeed(MSBuildExtensionPack.Resx.UIStringResourcePerEntityBuildEventCode.Rss_Title_of_BuildEventCode, MSBuildExtensionPack.Resx.UIStringResourcePerEntityBuildEventCode.Rss_Description_of_BuildEventCode, new Uri(urlOfList));

            //feed.Authors.Add(new SyndicationPerson(MSBuildExtensionPack.Resx.UIStringResourcePerEntityBuildEventCode.));
            //feed.Categories.Add(new SyndicationCategory(MSBuildExtensionPack.Resx.UIStringResourcePerEntityBuildEventCode.));

            MSBuildExtensionPack.CommonBLL.BuildEventCodeService instance = new MSBuildExtensionPack.CommonBLL.BuildEventCodeService();

            var request = new MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeRequestMessageUserDefinedOfAll();

            request.QueryPagingSetting            = new Framework.EntityContracts.QueryPagingSetting(1, 10);
            request.QueryOrderBySettingCollection = new Framework.EntityContracts.QueryOrderBySettingCollection("LastModifiedDateTime:DESC");
            var fromDataSource = instance.GetCollectionOfRssItemOfAll(request);

            List <SyndicationItem> items = new List <SyndicationItem>();

            if (fromDataSource.BusinessLogicLayerResponseStatus == Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageOK)
            {
                foreach (var datasourceItem in fromDataSource.Message)
                {
                    //string urlOfEntityRelated = string.Format("{0}{1}/{2}?{3}", MSBuildExtensionPack.Resx.UIStringResourcePerEntityBuildEventCode.HomeOwner, "BuildEventCode", "WPEntityRelatedOfBuildEventCode", "{Query String Parameters}");
                    SyndicationItem item1 = new SyndicationItem(
                        datasourceItem.Title,
                        datasourceItem.Description,
                        new Uri(urlOfList), // should be urlOfEntityRelated, should enter query string parameters
                        datasourceItem.IdentifierInString,
                        datasourceItem.PubDate);

                    items.Add(item1);
                }
            }

            feed.Items = items;
            return(feed);
        }
 /// <summary>
 /// Gets the single of entity of "All".
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 public Framework.CommonBLLEntities.BusinessLogicLayerResponseMessageRssItemCollection GetSingleOfRssItemOfAll(
     MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeRequestMessageUserDefinedOfAll request)
 {
     return(base.Channel.GetSingleOfRssItemOfAll(request));
 }
 /// <summary>
 /// Exists the of entity of "All".
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns>true if exists any, otherwise false</returns>
 public Framework.CommonBLLEntities.BusinessLogicLayerResponseMessageBoolean ExistsOfRssItemOfAll(
     MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeRequestMessageUserDefinedOfAll request)
 {
     return(base.Channel.ExistsOfRssItemOfAll(request));
 }
 /// <summary>
 /// Gets the collection of entity of "All".
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 public Framework.CommonBLLEntities.BusinessLogicLayerResponseMessageNameValuePairCollection GetCollectionOfNameValuePairOfAll(
     MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeRequestMessageUserDefinedOfAll request)
 {
     return(base.Channel.GetCollectionOfNameValuePairOfAll(request));
 }
 /// <summary>
 /// Gets the single of entity of "All".
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns></returns>
 public MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeResponseMessageBuiltIn GetSingleOfEntityOfAll(
     MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeRequestMessageUserDefinedOfAll request)
 {
     return(base.Channel.GetSingleOfEntityOfAll(request));
 }
 /// <summary>
 /// Gets the count of entity of "All".
 /// </summary>
 /// <param name="request">The request.</param>
 /// <returns>the count</returns>
 public Framework.CommonBLLEntities.BusinessLogicLayerResponseMessageInteger GetCountOfEntityOfAll(
     MSBuildExtensionPack.CommonBLLEntities.BuildEventCodeRequestMessageUserDefinedOfAll request)
 {
     return(base.Channel.GetCountOfEntityOfAll(request));
 }