public object CreateWritableClone() { CommandMetaData commandMetaData = (CommandMetaData)this.MemberwiseClone(); commandMetaData._isReadOnly = false; return((object)commandMetaData); }
public Guid Save(CommandMetaData commandMetaData) { DynamicDataStore store = this._changeApprovalDynamicDataStoreFactory.GetStore("EPiServer.ChangeApproval.Core.Internal.CommandMetaData"); if (store == null) { return(Guid.Empty); } lock (_lock) { var identity = store.Save(commandMetaData); return(identity == null ? Guid.Empty : identity.ExternalId); } }
public CommandMetaData GetByCommandId(Guid commandId) { var store = this._changeApprovalDynamicDataStoreFactory.GetStore("EPiServer.ChangeApproval.Core.Internal.CommandMetaData"); if (store == null) { return((CommandMetaData)null); } lock (_lock) { CommandMetaData commandMetaData = store.Items <CommandMetaData>().SingleOrDefault <CommandMetaData>((Expression <Func <CommandMetaData, bool> >)(command => command.CommandId == commandId)); return(commandMetaData); } }