AspNetEdit.UI.PropertyEditors.CollectionEditor.EndTransaction C# (CSharp) Method

EndTransaction() private method

private EndTransaction ( object obj, DesignerTransaction tran, object oldValue, object newValue, bool commit ) : void
obj object
tran System.ComponentModel.Design.DesignerTransaction
oldValue object
newValue object
commit bool
return void
        void EndTransaction(object obj, DesignerTransaction tran, object oldValue, object newValue, bool commit)
        {
            if (tran == null) return;

            if (commit) {
                IComponent com = obj as IComponent;
                IComponentChangeService ccs = (IComponentChangeService) com.Site.GetService (typeof(IComponentChangeService));
                if (ccs != null)
                    ccs.OnComponentChanged (com, parentRow.PropertyDescriptor, oldValue, newValue);
                tran.Commit ();
            }
            else
                tran.Cancel ();
        }