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

CreateTransaction() private method

private CreateTransaction ( object obj ) : DesignerTransaction
obj object
return System.ComponentModel.Design.DesignerTransaction
        DesignerTransaction CreateTransaction(object obj)
        {
            IComponent com = obj as IComponent;
            if (com == null || com.Site == null) return null;

            IDesignerHost dh = (IDesignerHost) com.Site.GetService (typeof(IDesignerHost));
            if (dh == null) return null;

            DesignerTransaction tran = dh.CreateTransaction ();
            IComponentChangeService ccs = (IComponentChangeService) com.Site.GetService (typeof(IComponentChangeService));
            if (ccs != null)
                ccs.OnComponentChanging (com, parentRow.PropertyDescriptor);
            return tran;
        }