GetBinaryData() public static method

public static GetBinaryData ( int pageTemplateId, Stream oldStream ) : void
pageTemplateId int
oldStream Stream
return void
Beispiel #1
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();
                }
            }
        }
Beispiel #2
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);
            }
        }