コード例 #1
0
        public object CreateWritableClone()
        {
            CommandMetaData commandMetaData = (CommandMetaData)this.MemberwiseClone();

            commandMetaData._isReadOnly = false;
            return((object)commandMetaData);
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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);
            }
        }