Example #1
0
		public static void GetBinaryData(int pageTemplateId, Stream oldStream)
		{
			PageTemplateManager pageTemplateManager = new PageTemplateManager();
			pageTemplateManager.PageTemplateNode = PageTemplate.LoadNode(pageTemplateId) as PageTemplate;
			pageTemplateManager.OriginalStream = oldStream;
			pageTemplateManager.GenerateBinaryData();
		}
Example #2
0
        public override void Save(SavingMode mode)
        {
            bool isLocalTransaction = !TransactionScope.IsActive;

            if (isLocalTransaction)
            {
                //TransactionScope.Begin();
            }
            try
            {
                base.Save(mode);

                if (Binary != null)
                {
                    //this is very ugly: recreates pages that use this template
                    PageTemplateManager.GetBinaryData(this.Id, OriginalTemplateStream);
                }

                if (isLocalTransaction)
                {
                    //TransactionScope.Commit();
                }
            }
            finally
            {
                if (isLocalTransaction && TransactionScope.IsActive)
                {
                    //TransactionScope.Rollback();
                }
            }
        }
Example #3
0
        public static void GetBinaryData(int pageTemplateId, Stream oldStream)
        {
            PageTemplateManager pageTemplateManager = new PageTemplateManager();

            pageTemplateManager.PageTemplateNode = PageTemplate.LoadNode(pageTemplateId) as PageTemplate;
            pageTemplateManager.OriginalStream   = oldStream;
            pageTemplateManager.GenerateBinaryData();
        }
Example #4
0
        // ================================================================================= Methods

        public override void Save(SavingMode mode)
        {
            base.Save(mode);

            if (Binary != null)
            {
                // this is very ugly: recreates pages that use this template
                PageTemplateManager.GetBinaryData(this.Id, OriginalTemplateStream);
            }
        }
Example #5
0
        private void SetBinary()
        {
            var x = PersonalizationSettings;

            if (x != null)
            {
                x.GetStream();
            }

            if (this.PageTemplateNode != null)
            {
                this.Binary = PageTemplateManager.GetPageBinaryData(this, this.PageTemplateNode);
            }
        }
Example #6
0
        public static BinaryData GetPageBinaryData(Page page, PageTemplate pageTemplate)
        {
            PageTemplateManager pageTemplateManager = new PageTemplateManager();

            return(pageTemplateManager.GetASPXBinaryByPageTemplate(page, pageTemplate));
        }
Example #7
0
		public static BinaryData GetPageBinaryData(Page page, PageTemplate pageTemplate)
		{
			PageTemplateManager pageTemplateManager = new PageTemplateManager();
			return pageTemplateManager.GetASPXBinaryByPageTemplate(page, pageTemplate);	
		}