Пример #1
0
        public IEnumerable <ElementAction> Provide(EntityToken entityToken)
        {
            var mediaRootEntityToken = (MediaRootFolderProviderEntityToken)entityToken;
            var actionToken          = new DownloadActionToken("MediaArchive", mediaRootEntityToken.Id);

            yield return(Actions.CreateElementAction(actionToken));
        }
        public IEnumerable <ElementAction> Provide(EntityToken entityToken)
        {
            var dataEntityToken = (DataEntityToken)entityToken;

            var folder = dataEntityToken.Data as IMediaFileFolder;

            if (folder != null)
            {
                var actionToken = new DownloadActionToken("MediaFolder", folder.KeyPath);

                yield return(Actions.CreateElementAction(actionToken));
            }
        }
        public IEnumerable <ElementAction> Provide(EntityToken entityToken)
        {
            var websiteFileEntityToken = (WebsiteFileElementProviderEntityToken)entityToken;

            var attr = C1File.GetAttributes(websiteFileEntityToken.Path);

            if ((attr & FileAttributes.Directory) == FileAttributes.Directory)
            {
                var root         = PathUtil.Resolve("~");
                var relativePath = websiteFileEntityToken.Path.Remove(0, root.Length);

                var actionToken = new DownloadActionToken("File", "/" + relativePath);

                yield return(Actions.CreateElementAction(actionToken));
            }
        }
Пример #4
0
        public IEnumerable <ElementAction> Provide(EntityToken entityToken)
        {
            var actionToken = new DownloadActionToken("File", "/");

            yield return(Actions.CreateElementAction(actionToken));
        }