コード例 #1
0
        /// <summary>
        /// Gets the raw string (xml) from the broker db by URI
        /// </summary>
        /// <param name="Url">TCM URI of the page</param>
        /// <returns>String with page xml or empty string if no page was found</returns>
        private string GetStringContentFromBrokerByUri(string TcmUri)
        {
            string retVal = string.Empty;

            //Get the publication ID an the itemID from the TcmUri
            using (var tcmUri = new Com.Tridion.Util.TCMURI(TcmUri))
            {
                int publicationID = tcmUri.GetPublicationId();
                int pageID        = tcmUri.GetItemId();

                using (var pageHome = new Com.Tridion.Broker.Pages.SQLPageHome())
                {
                    var data = pageHome.FindByPrimaryKey(publicationID, pageID);

                    retVal = data.GetString();
                }
            }

            return(retVal);
        }
 public List <ContentDelivery.Meta.IComponentMeta> GetComponentMetas(string[] componentUris)
 {
     Com.Tridion.Util.TCMURI uri = new Com.Tridion.Util.TCMURI(componentUris.First());
     using (Tridion.ContentDelivery.Meta.ComponentMetaFactory fac = new Tridion.ContentDelivery.Meta.ComponentMetaFactory(uri.GetPublicationId()))
     {
         return(componentUris
                .Select(compUri => fac.GetMeta(compUri))
                .ToList());
     }
 }
コード例 #3
0
 public List<ContentDelivery.Meta.IComponentMeta> GetComponentMetas(string[] componentUris)
 {
     Com.Tridion.Util.TCMURI uri = new Com.Tridion.Util.TCMURI(componentUris.First());
     using (Tridion.ContentDelivery.Meta.ComponentMetaFactory fac = new Tridion.ContentDelivery.Meta.ComponentMetaFactory(uri.GetPublicationId()))
     {
         return componentUris
             .Select(compUri => fac.GetMeta(compUri))
             .ToList();
     }
 }