예제 #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();
		}
예제 #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();
                }
            }
        }
예제 #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();
        }
예제 #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);
            }
        }
예제 #5
0
파일: Page.cs 프로젝트: vlslavik/SenseNet
        private void SetBinary()
        {
            var x = PersonalizationSettings;

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

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

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