Beispiel #1
0
        public virtual void Remove(Guid id, Guid ownerId)
        {
            var streamInfo = new StreamInfo(Stream.Null, "my.file", "file-file", "Custom", true);
            var owner      = new StorageOwner(ownerId, "MLP");
            var context    = new StorageContext <Stream>(streamInfo, owner, StorageFilterAction.Remove);

            CallAction(context, () => {
                //call data layer
            });
        }
Beispiel #2
0
        public virtual Guid Upload(Stream stream, Guid ownerId, string name, string group = null, string contentType = null, bool approved = false)
        {
            var streamInfo = new StreamInfo(Stream.Null, "my.file", "file-file", "Custom", true);
            var owner      = new StorageOwner(ownerId, "MLP");
            var context    = new StorageContext <StreamInfo>(streamInfo, owner, StorageFilterAction.Upload);

            CallAction(context, () => {
                //call data layer
            });

            return(context.Result.Id);
        }
Beispiel #3
0
 internal StorageContext(StreamInfo info, StorageOwner storageOwner, StorageFilterAction action)
 {
     Info         = info;
     StorageOwner = storageOwner;
     Action       = action;
 }