C# Class withSIX.Sync.Core.Legacy.SixSync.Repository

Inheritance: IEnableLogging
Exibir arquivo Open project: SIXNetworks/withSIX.Desktop Class Usage Examples

Public Properties

Property Type Description
ArchiveFormats string[]
Factory RepositoryFactory
IgnoredExtensions string[]
RepoTools RepositoryTools
RsyncableArchiveFormats string[]
TempExtensions string[]

Public Methods

Method Description
CleanupZsyncFiles ( ) : void
Commit ( bool changeVersion = true, bool createZsyncFiles = true ) : void
CommitAndPush ( string key = null, Uri host = null ) : void
ConfirmChecksumValidity ( bool localOnly ) : void
ConvertFormat ( string format ) : void
CreateZsyncFile ( string fileName ) : void
DeRegister ( IPublishingApi api, string name, string version, string registerInfo ) : Task
FixWhenMissing ( bool createZsyncFiles, string f ) : void
InitializeConfig ( IAbsoluteDirectoryPath path ) : void
LoadHosts ( ) : void
MovePackPath ( string path, string guid = null ) : void
Pack ( IAbsoluteFilePath file, IAbsoluteFilePath destination = null ) : void
PackWdFile ( bool createZsyncFiles, string change ) : void
ProcessChangedPack ( IStatus status, bool changesOnly ) : void
Push ( string key = null, Uri host = null ) : void
Register ( IPublishingApi api, string name, string version, string registerInfo ) : Task
RemoveIfObsolete ( string>.KeyValuePair pair ) : void
Repository ( IZsyncMake zsyncMake, StatusRepo statusRepo, string folder = "." ) : System
Repository ( IZsyncMake zsyncMake, string folder = "." ) : System
SumChangedPack ( IStatus status ) : void
TryCleanupTmpFiles ( ) : void
TryConfirmChecksumValidity ( bool localOnly ) : void
TryDeleteFile ( FileInfo fi ) : void
TryHandleWd ( IStatus status, bool changesOnly ) : void
TryLoadConfig ( bool fallback ) : void
TryLoadPackVersion ( bool allowPFailure ) : void
TryLoadWDVersion ( ) : void
Update ( Action config = null ) : Task
UpdateVersion ( bool changeVersion, string list, string removed ) : void

Protected Methods

Method Description
CalcSums ( RepositoryFileType type, bool ignoreDeleted = false ) : string>.Dictionary
ChangedPack ( IStatus status ) : System.Threading.Tasks.Task
ChangedWd ( IStatus status, string change, bool changesOnly ) : void
CheckRepository ( bool checkFormat ) : void
CompareSums ( RepositoryFileType type, int i ) : string[][]
EndOutput ( IStatus status ) : void
FailedOutput ( IStatus status ) : void
FetchRepository ( ) : System.Threading.Tasks.Task
FixGuid ( bool pushIfChanged = true ) : bool
FixMissingPackFiles ( string files, bool createZsyncFiles = true ) : void
FixMissingZsyncFiles ( ) : void
GetNewPackPath ( string path, string guid = null ) : string
GetNewPackPathUnlessEqual ( string path, string guid = null ) : string
GetPackFile ( string fileName ) : IAbsoluteFilePath
GetRsyncFile ( string fileName ) : IAbsoluteFilePath
GetWdFile ( string fileName ) : IAbsoluteFilePath
HandleCase ( ) : void
HandleWd ( string item, bool changesOnly, bool silence = false ) : void
IncludeMatch ( string key, RepositoryFileType type = RepositoryFileType.Wd ) : bool
LoadConfig ( bool fallback = false ) : void
LoadSums ( bool ignoreDeleted = false, bool localOnly = false ) : void
LoadVersions ( bool checkFormat = false, bool allowPFailure = true ) : void
ProcessPackChanges ( IEnumerable wdChanges, bool changesOnly = true ) : Task
ProcessWdChanges ( string differences, bool changesOnly ) : Task
PushFolder ( IAbsoluteDirectoryPath packFolder, Uri host, string>.Dictionary dictionary ) : void
RemovedPack ( string change ) : void
RemovedWd ( string change ) : void
SaveAndReloadConfig ( bool fallback = false ) : void
SaveVersions ( ) : void
StartOutput ( IStatus status ) : void
UpdateRepoInfo ( ) : void
VerifyChecksums ( bool localOnly = false ) : IList>.Tuple

Private Methods

Method Description
BuildPublishModel ( string name, string version, string registerInfo ) : PublishModModel
ConfirmMatch ( ) : bool
ConvertRepositoryFormat ( ) : System.Threading.Tasks.Task
CreateStatus ( string file ) : IStatus
DownloadPackChanges ( IEnumerable unchanged, string list, bool changesOnly ) : System.Threading.Tasks.Task
GetChangedSize ( IEnumerable list ) : int
GetChangelog ( ) : string
GetCppInfo ( ) : Tuple
GetFiles ( IAbsoluteDirectoryPath dir ) : IEnumerable
GetLicense ( ) : string
GetPackSpec ( IStatus status ) : Spec
GetReadme ( ) : string
HandleBackupRepositoryFile ( IAbsoluteFilePath repFile, IAbsoluteFilePath bkpFile ) : void
HandleOpts ( SyncOptions opts, bool save = true ) : bool
ProcessPackChange ( string item, bool changesOnly ) : System.Threading.Tasks.Task
TryChangedPack ( IStatus status ) : Task
TryFetchRepo ( IAbsoluteFilePath bkpFile, IAbsoluteFilePath repFile ) : Task
TryProcessPackChange ( IStatus status, bool changesOnly ) : Task
Update ( SyncOptions opts ) : Task
UpdateRepository ( ) : Task

Method Details

CalcSums() protected method

protected CalcSums ( RepositoryFileType type, bool ignoreDeleted = false ) : string>.Dictionary
type RepositoryFileType
ignoreDeleted bool
return string>.Dictionary

ChangedPack() protected method

protected ChangedPack ( IStatus status ) : System.Threading.Tasks.Task
status IStatus
return System.Threading.Tasks.Task

ChangedWd() protected method

protected ChangedWd ( IStatus status, string change, bool changesOnly ) : void
status IStatus
change string
changesOnly bool
return void

CheckRepository() protected method

protected CheckRepository ( bool checkFormat ) : void
checkFormat bool
return void

CleanupZsyncFiles() public method

public CleanupZsyncFiles ( ) : void
return void

Commit() public method

public Commit ( bool changeVersion = true, bool createZsyncFiles = true ) : void
changeVersion bool
createZsyncFiles bool
return void

CommitAndPush() public method

public CommitAndPush ( string key = null, Uri host = null ) : void
key string
host System.Uri
return void

CompareSums() protected method

protected CompareSums ( RepositoryFileType type, int i ) : string[][]
type RepositoryFileType
i int
return string[][]

ConfirmChecksumValidity() public method

public ConfirmChecksumValidity ( bool localOnly ) : void
localOnly bool
return void

ConvertFormat() public method

public ConvertFormat ( string format ) : void
format string
return void

CreateZsyncFile() public method

public CreateZsyncFile ( string fileName ) : void
fileName string
return void

DeRegister() public method

public DeRegister ( IPublishingApi api, string name, string version, string registerInfo ) : Task
api IPublishingApi
name string
version string
registerInfo string
return Task

EndOutput() protected method

protected EndOutput ( IStatus status ) : void
status IStatus
return void

FailedOutput() protected method

protected FailedOutput ( IStatus status ) : void
status IStatus
return void

FetchRepository() protected method

protected FetchRepository ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

FixGuid() protected method

protected FixGuid ( bool pushIfChanged = true ) : bool
pushIfChanged bool
return bool

FixMissingPackFiles() protected method

protected FixMissingPackFiles ( string files, bool createZsyncFiles = true ) : void
files string
createZsyncFiles bool
return void

FixMissingZsyncFiles() protected method

protected FixMissingZsyncFiles ( ) : void
return void

FixWhenMissing() public method

public FixWhenMissing ( bool createZsyncFiles, string f ) : void
createZsyncFiles bool
f string
return void

GetNewPackPath() protected method

protected GetNewPackPath ( string path, string guid = null ) : string
path string
guid string
return string

GetNewPackPathUnlessEqual() protected method

protected GetNewPackPathUnlessEqual ( string path, string guid = null ) : string
path string
guid string
return string

GetPackFile() protected method

protected GetPackFile ( string fileName ) : IAbsoluteFilePath
fileName string
return IAbsoluteFilePath

GetRsyncFile() protected method

protected GetRsyncFile ( string fileName ) : IAbsoluteFilePath
fileName string
return IAbsoluteFilePath

GetWdFile() protected method

protected GetWdFile ( string fileName ) : IAbsoluteFilePath
fileName string
return IAbsoluteFilePath

HandleCase() protected method

protected HandleCase ( ) : void
return void

HandleWd() protected method

protected HandleWd ( string item, bool changesOnly, bool silence = false ) : void
item string
changesOnly bool
silence bool
return void

IncludeMatch() protected method

protected IncludeMatch ( string key, RepositoryFileType type = RepositoryFileType.Wd ) : bool
key string
type RepositoryFileType
return bool

InitializeConfig() public static method

public static InitializeConfig ( IAbsoluteDirectoryPath path ) : void
path IAbsoluteDirectoryPath
return void

LoadConfig() protected method

protected LoadConfig ( bool fallback = false ) : void
fallback bool
return void

LoadHosts() public method

public LoadHosts ( ) : void
return void

LoadSums() protected method

protected LoadSums ( bool ignoreDeleted = false, bool localOnly = false ) : void
ignoreDeleted bool
localOnly bool
return void

LoadVersions() protected method

protected LoadVersions ( bool checkFormat = false, bool allowPFailure = true ) : void
checkFormat bool
allowPFailure bool
return void

MovePackPath() public method

public MovePackPath ( string path, string guid = null ) : void
path string
guid string
return void

Pack() public method

public Pack ( IAbsoluteFilePath file, IAbsoluteFilePath destination = null ) : void
file IAbsoluteFilePath
destination IAbsoluteFilePath
return void

PackWdFile() public method

public PackWdFile ( bool createZsyncFiles, string change ) : void
createZsyncFiles bool
change string
return void

ProcessChangedPack() public method

public ProcessChangedPack ( IStatus status, bool changesOnly ) : void
status IStatus
changesOnly bool
return void

ProcessPackChanges() protected method

protected ProcessPackChanges ( IEnumerable wdChanges, bool changesOnly = true ) : Task
wdChanges IEnumerable
changesOnly bool
return Task

ProcessWdChanges() protected method

protected ProcessWdChanges ( string differences, bool changesOnly ) : Task
differences string
changesOnly bool
return Task

Push() public method

public Push ( string key = null, Uri host = null ) : void
key string
host System.Uri
return void

PushFolder() protected method

protected PushFolder ( IAbsoluteDirectoryPath packFolder, Uri host, string>.Dictionary dictionary ) : void
packFolder IAbsoluteDirectoryPath
host System.Uri
dictionary string>.Dictionary
return void

Register() public method

public Register ( IPublishingApi api, string name, string version, string registerInfo ) : Task
api IPublishingApi
name string
version string
registerInfo string
return Task

RemoveIfObsolete() public method

public RemoveIfObsolete ( string>.KeyValuePair pair ) : void
pair string>.KeyValuePair
return void

RemovedPack() protected method

protected RemovedPack ( string change ) : void
change string
return void

RemovedWd() protected method

protected RemovedWd ( string change ) : void
change string
return void

Repository() public method

public Repository ( IZsyncMake zsyncMake, StatusRepo statusRepo, string folder = "." ) : System
zsyncMake IZsyncMake
statusRepo StatusRepo
folder string
return System

Repository() public method

public Repository ( IZsyncMake zsyncMake, string folder = "." ) : System
zsyncMake IZsyncMake
folder string
return System

SaveAndReloadConfig() protected method

protected SaveAndReloadConfig ( bool fallback = false ) : void
fallback bool
return void

SaveVersions() protected method

protected SaveVersions ( ) : void
return void

StartOutput() protected method

protected StartOutput ( IStatus status ) : void
status IStatus
return void

SumChangedPack() public method

public SumChangedPack ( IStatus status ) : void
status IStatus
return void

TryCleanupTmpFiles() public method

public TryCleanupTmpFiles ( ) : void
return void

TryConfirmChecksumValidity() public method

public TryConfirmChecksumValidity ( bool localOnly ) : void
localOnly bool
return void

TryDeleteFile() public method

public TryDeleteFile ( FileInfo fi ) : void
fi FileInfo
return void

TryHandleWd() public method

public TryHandleWd ( IStatus status, bool changesOnly ) : void
status IStatus
changesOnly bool
return void

TryLoadConfig() public method

public TryLoadConfig ( bool fallback ) : void
fallback bool
return void

TryLoadPackVersion() public method

public TryLoadPackVersion ( bool allowPFailure ) : void
allowPFailure bool
return void

TryLoadWDVersion() public method

public TryLoadWDVersion ( ) : void
return void

Update() public method

public Update ( Action config = null ) : Task
config Action
return Task

UpdateRepoInfo() protected method

protected UpdateRepoInfo ( ) : void
return void

UpdateVersion() public method

public UpdateVersion ( bool changeVersion, string list, string removed ) : void
changeVersion bool
list string
removed string
return void

VerifyChecksums() protected method

protected VerifyChecksums ( bool localOnly = false ) : IList>.Tuple
localOnly bool
return IList>.Tuple

Property Details

ArchiveFormats public_oe static_oe property

public static string[] ArchiveFormats
return string[]

Factory public_oe static_oe property

public static RepositoryFactory,withSIX.Sync.Core.Legacy.SixSync Factory
return RepositoryFactory

IgnoredExtensions public_oe static_oe property

public static string[] IgnoredExtensions
return string[]

RepoTools public_oe static_oe property

public static RepositoryTools RepoTools
return RepositoryTools

RsyncableArchiveFormats public_oe static_oe property

public static string[] RsyncableArchiveFormats
return string[]

TempExtensions public_oe static_oe property

public static string[] TempExtensions
return string[]