コード例 #1
0
 /// <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)
 {
 }
コード例 #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);
        }
コード例 #3
0
ファイル: FileSystem.cs プロジェクト: ame89/nfx
 /// <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);
コード例 #4
0
ファイル: FileSystem.cs プロジェクト: ame89/nfx
 /// <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)
 {
 }
コード例 #5
0
ファイル: FileSystem.cs プロジェクト: ame89/nfx
 /// <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)
 {
 }
コード例 #6
0
ファイル: FileSystem.cs プロジェクト: ame89/nfx
 /// <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);
 }
コード例 #7
0
ファイル: FileSystem.cs プロジェクト: ame89/nfx
 /// <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)
 {
 }
コード例 #8
0
ファイル: FileSystem.cs プロジェクト: ame89/nfx
 /// <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);
 }
コード例 #9
0
ファイル: FileSystem.cs プロジェクト: dotnetchris/nfx
 /// <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)));
 }
コード例 #10
0
ファイル: FileSystem.cs プロジェクト: dotnetchris/nfx
 /// <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)));
 }
コード例 #11
0
ファイル: FileSystem.cs プロジェクト: dotnetchris/nfx
 /// <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)));
 }
コード例 #12
0
ファイル: FileSystem.cs プロジェクト: dotnetchris/nfx
 /// <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)));
 }
コード例 #13
0
ファイル: FileSystem.cs プロジェクト: dotnetchris/nfx
 /// <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)));
 }