Example #1
0
        private int getVersionId(IFileSystemVersion version)
        {
            if (version == null)
            {
                return(-1);
            }
            var lst = m_Versions;

            return(lst.IndexOf(version));
        }
Example #2
0
        public override IEnumerable <IFileSystemVersion> GetVersions(IFileSystemVersion from, int countBack)
        {
            int fromVersionNumber = from.Name.AsInt();
            int listVersionFirst  = fromVersionNumber - countBack;
            int listVersionLast   = fromVersionNumber - 1;

            IEnumerable <IFileSystemVersion> versions = m_WebDAV.ListVersions(listVersionFirst.ToString(), listVersionLast.ToString());

            return(versions);
        }
Example #3
0
        public ICMSContext GetContext(Portal portal, IFileSystemVersion version)
        {
            if (version == null)
            {
                version = LatestVersion;
            }

            var versionId = getVersionId(version);


            //todo sdelat context

            return(null);
        }
Example #4
0
 /// <summary>
 /// Async version of <see cref="GetVersions(IFileSystemVersion, int)"/>
 /// </summary>
 public virtual Task <IEnumerable <IFileSystemVersion> > GetVersionsAsync(IFileSystemVersion from, int countBack)
 {
     return(Task.FromResult(Enumerable.Empty <IFileSystemVersion>()));
 }
Example #5
0
 /// <summary>
 /// Returns specified number of versions going back from the specific version. This call is thread-safe
 /// </summary>
 public virtual IEnumerable <IFileSystemVersion> GetVersions(IFileSystemVersion from, int countBack)
 {
     return(Enumerable.Empty <IFileSystemVersion>());
 }
Example #6
0
 /// <summary>
 /// Async version of <see cref="P:Version"/>
 /// </summary>
 public virtual Task SetFileSystemVersionAsync(IFileSystemVersion version)
 {
     CheckDisposed();
     return(m_FileSystem.DoSetVersionAsync(this, version));
 }
Example #7
0
 /// <summary>
 /// Override in particular file systems that support versioning to set seesion to specific version.
 /// This method may be called by miltiple threads
 /// </summary>
 protected internal virtual void DoSetVersion(FileSystemSession session, IFileSystemVersion version)
 {
 }
Example #8
0
 internal NOPCMSContext(Portal portal, IFileSystemVersion version)
 {
     m_Portal  = portal;
     m_Version = version;
 }
Example #9
0
 /// <summary>
 /// Async version of <see cref="P:Version"/>
 /// </summary>
 /// <returns></returns>
 public virtual Task SetFileSystemVersionAsync(IFileSystemVersion version)
 {
     return(m_FileSystem.DoSetVersionAsync(this, version));
 }
Example #10
0
 /// <summary>
 /// Async version of <see cref="DoSetVersion (FileSystemSession, IFileSystemVersion)"/>.
 /// This base/default implementation just synchronously calls <see cref="DoSetVersion (FileSystemSession, IFileSystemVersion)"/> and
 /// returns already completed Task with result returned by <see cref="DoSetVersion (FileSystemSession, IFileSystemVersion)"/>
 /// </summary>
 protected internal virtual Task DoSetVersionAsync(FileSystemSession session, IFileSystemVersion version)
 {
     return(TaskUtils.AsCompletedTask(() => DoSetVersion(session, version)));
 }
Example #11
0
        public override IEnumerable<IFileSystemVersion> GetVersions(IFileSystemVersion from, int countBack)
        {
            int fromVersionNumber = from.Name.AsInt();
              int listVersionFirst = fromVersionNumber - countBack;
              int listVersionLast = fromVersionNumber - 1;

              IEnumerable<IFileSystemVersion> versions = m_WebDAV.ListVersions(listVersionFirst.ToString(), listVersionLast.ToString());

              return versions;
        }