private int getVersionId(IFileSystemVersion version) { if (version == null) { return(-1); } var lst = m_Versions; return(lst.IndexOf(version)); }
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); }
public ICMSContext GetContext(Portal portal, IFileSystemVersion version) { if (version == null) { version = LatestVersion; } var versionId = getVersionId(version); //todo sdelat context return(null); }
/// <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>())); }
/// <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>()); }
/// <summary> /// Async version of <see cref="P:Version"/> /// </summary> public virtual Task SetFileSystemVersionAsync(IFileSystemVersion version) { CheckDisposed(); return(m_FileSystem.DoSetVersionAsync(this, version)); }
/// <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) { }
internal NOPCMSContext(Portal portal, IFileSystemVersion version) { m_Portal = portal; m_Version = version; }
/// <summary> /// Async version of <see cref="P:Version"/> /// </summary> /// <returns></returns> public virtual Task SetFileSystemVersionAsync(IFileSystemVersion version) { return(m_FileSystem.DoSetVersionAsync(this, version)); }
/// <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))); }
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; }