/// <summary>
 /// Internal method that should not be called by developers
 /// </summary>
 public FileSystemDirectory(FileSystemSession session,
                            string parentPath,
                            string name,
                            IFileSystemHandle handle) :
     base(session, parentPath, name, handle)
 {
 }
Exemple #2
0
        protected FileSystemSessionItem(FileSystemSession session,
                                        string parentPath,
                                        string name,
                                        IFileSystemHandle handle)
        {
            m_FileSystem = session.FileSystem;
            m_Session    = session;
            m_ParentPath = parentPath;
            m_Handle     = handle;
            m_Name       = name;

            m_Session.m_Items.Add(this);
        }
Exemple #3
0
 /// <summary>
 /// Override to get file or directory from specified path. Return null if item does not exist.
 /// This method may be called by miltiple threads
 /// </summary>
 protected internal abstract FileSystemSessionItem DoNavigate(FileSystemSession session, string path);
Exemple #4
0
 /// <summary>
 /// Override in particular file systems that support transactions to rollback transaction in specified session.
 /// This method may be called by miltiple threads
 /// </summary>
 protected internal virtual void  DoRollbackTransaction(FileSystemSession session)
 {
 }
Exemple #5
0
 /// <summary>
 /// Override in particular file systems that support transactions to commit transaction in specified session.
 /// This method may be called by miltiple threads
 /// </summary>
 protected internal virtual void  DoCommitTransaction(FileSystemSession session)
 {
 }
Exemple #6
0
 /// <summary>
 /// Override in particular file systems that support transactions to begin transaction in specified session.
 /// This method may be called by miltiple threads
 /// </summary>
 protected internal virtual IFileSystemTransactionHandle DoBeginTransaction(FileSystemSession session)
 {
     return(null);
 }
Exemple #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)
 {
 }
Exemple #8
0
 /// <summary>
 /// Override in particular file systems that support versioning to get version object for session.
 /// This method may be called by miltiple threads
 /// </summary>
 protected internal virtual IFileSystemVersion DoGetVersion(FileSystemSession session)
 {
     return(null);
 }
Exemple #9
0
 /// <summary>
 /// Async version of <see cref="DoNavigate(FileSystemSession, string)"/>.
 /// This base/default implementation just synchronously calls <see cref="DoNavigate(FileSystemSession, string)"/> and
 /// returns already completed Task with result returned by <see cref="DoNavigate(FileSystemSession, string)"/>
 /// </summary>
 protected internal virtual Task <FileSystemSessionItem> DoNavigateAsync(FileSystemSession session, string path)
 {
     return(TaskUtils.AsCompletedTask(() => DoNavigate(session, path)));
 }
Exemple #10
0
 /// <summary>
 /// Async version of <see cref="DoRollbackTransaction(FileSystemSession)"/>.
 /// This base/default implementation just synchronously calls <see cref="DoRollbackTransaction(FileSystemSession)"/> and
 /// returns already completed Task with result returned by <see cref="DoRollbackTransaction(FileSystemSession)"/>
 /// </summary>
 protected internal virtual Task DoRollbackTransactionAsync(FileSystemSession session)
 {
     return(TaskUtils.AsCompletedTask(() => DoRollbackTransaction(session)));
 }
Exemple #11
0
 /// <summary>
 /// Async version of <see cref="DoBeginTransaction(FileSystemSession)"/>.
 /// This base/default implementation just synchronously calls <see cref="DoBeginTransaction(FileSystemSession)"/> and
 /// returns already completed Task with result returned by <see cref="DoBeginTransaction(FileSystemSession)"/>
 /// </summary>
 protected internal virtual Task <IFileSystemTransactionHandle> DoBeginTransactionAsync(FileSystemSession session)
 {
     return(TaskUtils.AsCompletedTask(() => DoBeginTransaction(session)));
 }
Exemple #12
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)));
 }
Exemple #13
0
 /// <summary>
 /// Async version of <see cref="DoGetLatestVersion(FileSystemSession)"/>.
 /// This base/default implementation just synchronously calls <see cref="DoGetLatestVersion(FileSystemSession)"/> and
 /// returns already completed Task with result returned by <see cref="DoGetLatestVersion(FileSystemSession)"/>
 /// </summary>
 protected internal virtual Task <IFileSystemVersion> DoGetLatestVersionAsync(FileSystemSession session)
 {
     return(TaskUtils.AsCompletedTask(() => DoGetLatestVersion(session)));
 }