public static void Delete <T>(this T entity, DeleteSymbol <T> symbol, params object[] args) where T : class, IEntity { var op = Find <IDeleteOperation>(entity.GetType(), symbol.Symbol).AssertEntity((Entity)(IEntity)entity); op.Delete(entity, args); }
public static void DeleteLite <T>(this Lite <T> lite, DeleteSymbol <T> symbol, params object[] args) where T : class, IEntity { IEntity entity = lite.RetrieveAndForget(); var op = Find <IDeleteOperation>(lite.EntityType, symbol.Symbol).AssertLite(); op.Delete(entity, args); }
public Delete(DeleteSymbol <T> symbol) { if (symbol == null) { throw AutoInitAttribute.ArgumentNullException(typeof(DeleteSymbol <T>), nameof(symbol)); } this.Symbol = symbol; this.Lite = true; }
public static void DeleteAjax <T>(this PopupControl <T> container, DeleteSymbol <T> symbol, bool consumeAlert = true) where T : Entity { container.OperationClick(symbol); if (consumeAlert) { container.Selenium.ConsumeAlert(); } container.WaitNotVisible(); }
public static void Delete <T>(this FrameModalProxy <T> container, DeleteSymbol <T> symbol, bool consumeAlert = true) where T : Entity { container.OperationClick(symbol); if (consumeAlert) { container.Selenium.CloseMessageModal(MessageModalButton.Yes); } container.WaitNotVisible(); }
public static FluentInclude <T> WithDelete <T>(this FluentInclude <T> fi, DeleteSymbol <T> delete) where T : Entity { new Graph <T> .Delete(delete) { Delete = (e, _) => e.Delete() } .Register(); return(fi); }
public static FluentInclude <T> WithVirtualMList <T, L>(this FluentInclude <T> fi, Expression <Func <T, MList <L> > > mListField, Expression <Func <L, Lite <T>?> > backReference, ExecuteSymbol <L> saveOperation, DeleteSymbol <L> deleteOperation) where T : Entity where L : Entity { return(fi.WithVirtualMList(mListField, backReference, onSave: saveOperation == null ? null : new Action <L, T>((line, e) => { line.Execute(saveOperation); }), onRemove: deleteOperation == null ? null : new Action <L, T>((line, e) => { line.Delete(deleteOperation); }))); }
public static FluentInclude <T> WithVirtualMList <T, L>(this FluentInclude <T> fi, Func <T, MList <L> > getMList, Expression <Func <L, Lite <T> > > getBackReference, ExecuteSymbol <L> saveOperation, DeleteSymbol <L> deleteOperation) where T : Entity where L : Entity { return(fi.WithVirtualMList(getMList, getBackReference, onSave: saveOperation == null ? null : new Action <L, T>((line, e) => { if (line.IsGraphModified) { line.Execute(saveOperation); } }), onRemove: deleteOperation == null ? null : new Action <L, T>((line, e) => { line.Delete(deleteOperation); }))); }
public static SearchPageProxy DeleteSubmit <T>(this NormalPage <T> container, DeleteSymbol <T> symbol, bool consumeAlert = true) where T : Entity { container.OperationClick(symbol); if (consumeAlert) { container.Selenium.ConsumeAlert(); } return(new SearchPageProxy(container.Selenium).WaitLoaded()); }
public Delete(DeleteSymbol <T> symbol) : base(symbol) { FromStates = new List <S>(); }
public Delete(DeleteSymbol <T> symbol) { this.Symbol = symbol ?? throw AutoInitAttribute.ArgumentNullException(typeof(DeleteSymbol <T>), nameof(symbol)); }
public PackageDeleteAlgorithm(DeleteSymbol <T> deleteSymbol) { this.DeleteSymbol = deleteSymbol ?? throw new ArgumentNullException("operatonKey"); }
public static Graph <T> .Delete FindDelete <T>(DeleteSymbol <T> symbol) where T : class, IEntity { return((Graph <T> .Delete)FindOperation(typeof(T), symbol.Symbol)); }
public IDisposable Sync <T>(Dictionary <string, T> entityDic, IEnumerable <XElement> elements, IFromXmlContext ctx, ExecuteSymbol <T> saveOperation, DeleteSymbol <T> deleteOperation, Action <T, XElement> setXml) where T : Entity, IWorkflowObjectEntity, new() { var xmlDic = elements.ToDictionaryEx(a => a.Attribute("BpmnElementId") !.Value); Synchronizer.Synchronize( xmlDic, entityDic, createNew: (bpmnId, xml) => { var entity = new T(); entity.BpmnElementId = xml.Attribute("BpmnElementId") !.Value; setXml(entity, xml); SaveOrMark <T>(entity, saveOperation, ctx); entityDic.Add(bpmnId, entity); },
public static void DeleteLite <T, B>(this Lite <T> lite, DeleteSymbol <B> symbol, params object[] args) where T : class, IEntity, B where B : class, IEntity { Server.Execute((IOperationServer s) => s.DeleteLite(lite, symbol.Symbol, args)); }