C# Class GitSharp.Core.DirectoryCache.DirCacheEditor

Updates a DirCache by supplying discrete edit commands. An editor updates a DirCache by taking a list of PathEdit commands and executing them against the entries of the destination cache to produce a new cache. This edit style allows applications to insert a few commands and then have the editor compute the proper entry indexes necessary to perform an efficient in-order update of the index records. This can be easier to use than DirCacheBuilder.
Inheritance: GitSharp.Core.DirectoryCache.BaseDirCacheEditor
Show file Open project: stschake/GitSharp

Public Methods

Method Description
DirCacheEditor ( DirCache dirCache, int entryCount ) : System

Construct a new editor.

add ( PathEdit edit ) : void

Append one edit command to the list of commands to be applied. Edit commands may be added in any order chosen by the application. They are automatically rearranged by the builder to provide the most efficient update possible.

commit ( ) : bool
finish ( ) : void

Private Methods

Method Description
ApplyEdits ( ) : void

Method Details

DirCacheEditor() public method

Construct a new editor.
public DirCacheEditor ( DirCache dirCache, int entryCount ) : System
dirCache DirCache /// The cache this editor will eventually update. ///
entryCount int /// Estimated number of entries the editor will have upon /// completion. This sizes the initial entry table. ///
return System

add() public method

Append one edit command to the list of commands to be applied. Edit commands may be added in any order chosen by the application. They are automatically rearranged by the builder to provide the most efficient update possible.
public add ( PathEdit edit ) : void
edit PathEdit Another edit command.
return void

commit() public method

public commit ( ) : bool
return bool

finish() public method

public finish ( ) : void
return void