C# Class Sage.Platform.Upgrade.ProjectUpgradeService

Inheritance: IProjectUpgradeService
ファイルを表示 Open project: Saleslogix/ProjectUpgrade

Public Properties

Property Type Description
GetModelUpgradeServices IEnumerable>.Func

Protected Properties

Property Type Description
_registeredBundles BundleInfo>.Dictionary
_registeredProjects RegisteredProjectInfo>.Dictionary

Private Properties

Property Type Description
AddCommandParameter void
AddDirectoryFilesToRepository void
AddFileToReleaseDb void
AddFileToReleaseDb void
ApplyTweaksForAutoBundleInstall void
BundleExistsInRepository bool
CalculateHashCode byte[]
CreateFileReleaseInfosFromReader IEnumerable
CreateReleaseDbSchemaIfNecessary void
CreateReleaseDbSchemaIfNecessary void
DetermineProjectVersionFromMatches RegisteredProjectInfo
ExecuteNonQuery void
ExtractBundleInfoFromBundleManifest BundleInfo
FileHasReleaseMatch bool
FileIsAValidAdd bool
FileIsAutoMergable bool
FileShouldBeTracked bool
FindAllMatchingReleaseInfo List
FindAllMatchingReleasesInProject List>.Dictionary
FindInstalledBundlesByMatches IEnumerable
GetAllReleaseInfoFromProjectByFile List>>.IEnumerable
GetAllTrackedFilesInProject IEnumerable
GetBackupFileNameFromProjectPath string
GetBundleInfoById BundleInfo
GetBundlesApplied List
GetLastInsertId long
GetPossibleBundlesApplied List
GetProjectById RegisteredProjectInfo
GetReaderOfMatchesByFileName IDataReader
GetReaderOfMatchesByUrl IDataReader
InsertBundleRecord long
InsertProjectRecord long
InstallBundle bool
LoadRegisteredBundles BundleInfo>.Dictionary
LoadRegisteredProjects RegisteredProjectInfo>.Dictionary
MergeFileIsAValidDiff bool

Public Methods

Method Description
AddBundleToRepository ( string bundlePath, System.Version version ) : void
AddProjectToRepository ( string projectPath, System.Version version, string projectName ) : void
AnalyzeForUpgrade ( IProject sourceProject, IProject baseProject ) : UpgradeReport
BuildBaseProject ( ProjectInstallInfo installedProjectInfo, IDirectoryInfo projectBackupDir, string baseProjectPath ) : bool
GetBundleInfosFromProject ( IDriveInfo projectDrive ) : IEnumerable
GetReleaseInfoByPath ( string path ) : List
IdentifyProjectVersion ( string projectPath ) : ProjectInstallInfo
ProjectUpgradeService ( ) : System
Upgrade ( IProject sourceProject, IProject baseProject, IProject targetProject ) : UpgradeReport

Protected Methods

Method Description
GetOpenConnection ( ) : IDbConnection

Private Methods

Method Description
AddCommandParameter ( string name, object value, IDbCommand command ) : void
AddDirectoryFilesToRepository ( IDirectoryInfo directory, System.Version version, int bundleId = null, int projectId = null ) : void
AddFileToReleaseDb ( IFileInfo file, System.Version version, IDbConnection connection, int bundleId = null, int projectId = null ) : void
AddFileToReleaseDb ( string url, System.Version version, IDbConnection connection, byte hash, int bundleId = null, int projectId = null ) : void
ApplyTweaksForAutoBundleInstall ( Bundle bundle ) : void
BundleExistsInRepository ( IDirectoryInfo bundleDir, string bundleFileName ) : bool
CalculateHashCode ( IFileInfo file ) : byte[]
CreateFileReleaseInfosFromReader ( IDataReader reader ) : IEnumerable
CreateReleaseDbSchemaIfNecessary ( ) : void
CreateReleaseDbSchemaIfNecessary ( IDbConnection connection ) : void
DetermineProjectVersionFromMatches ( IEnumerable matchesByUrl ) : RegisteredProjectInfo
ExecuteNonQuery ( string sql, IDbConnection connection ) : void
ExtractBundleInfoFromBundleManifest ( IFileInfo bundleManifestFile, string bundleFileName ) : BundleInfo
FileHasReleaseMatch ( IFileInfo file, List releases ) : bool
FileIsAValidAdd ( IFileInfo file, IProject baseProject, IProject sourceProject, List warnings, IEnumerable modelUpgradeServices ) : bool
FileIsAutoMergable ( string url, IEnumerable modelUpgradeServices ) : bool
FileShouldBeTracked ( string path ) : bool
FindAllMatchingReleaseInfo ( IFileInfo file ) : List
FindAllMatchingReleasesInProject ( string projectPath ) : List>.Dictionary
FindInstalledBundlesByMatches ( IEnumerable matchesByUrl, System.Version mainVersion ) : IEnumerable
GetAllReleaseInfoFromProjectByFile ( string projectPath ) : List>>.IEnumerable
GetAllTrackedFilesInProject ( string projectPath ) : IEnumerable
GetBackupFileNameFromProjectPath ( string projectPath ) : string
GetBundleInfoById ( int id ) : BundleInfo
GetBundlesApplied ( IEnumerable matchedBundles, IEnumerable bundlesFromManifests ) : List
GetLastInsertId ( IDbConnection connection ) : long
GetPossibleBundlesApplied ( IEnumerable matchedBundles, IEnumerable bundlesFromManifests ) : List
GetProjectById ( int id ) : RegisteredProjectInfo
GetReaderOfMatchesByFileName ( string fileName, IDbConnection connection ) : IDataReader
GetReaderOfMatchesByUrl ( string url, IDbConnection connection ) : IDataReader
InsertBundleRecord ( BundleInfo bundleInfo, System.Version version ) : long
InsertProjectRecord ( RegisteredProjectInfo project ) : long
InstallBundle ( string bundlePath, string bundleFileName, IProject project ) : bool
LoadRegisteredBundles ( ) : BundleInfo>.Dictionary
LoadRegisteredProjects ( ) : RegisteredProjectInfo>.Dictionary
MergeFileIsAValidDiff ( IFileInfo file, List releases, IProject baseProject, IProject sourceProject, List warnings, IEnumerable modelUpgradeServices ) : bool

Method Details

AddBundleToRepository() public method

public AddBundleToRepository ( string bundlePath, System.Version version ) : void
bundlePath string
version System.Version
return void

AddProjectToRepository() public method

public AddProjectToRepository ( string projectPath, System.Version version, string projectName ) : void
projectPath string
version System.Version
projectName string
return void

AnalyzeForUpgrade() public method

public AnalyzeForUpgrade ( IProject sourceProject, IProject baseProject ) : UpgradeReport
sourceProject IProject
baseProject IProject
return UpgradeReport

BuildBaseProject() public method

public BuildBaseProject ( ProjectInstallInfo installedProjectInfo, IDirectoryInfo projectBackupDir, string baseProjectPath ) : bool
installedProjectInfo ProjectInstallInfo
projectBackupDir IDirectoryInfo
baseProjectPath string
return bool

GetBundleInfosFromProject() public method

public GetBundleInfosFromProject ( IDriveInfo projectDrive ) : IEnumerable
projectDrive IDriveInfo
return IEnumerable

GetOpenConnection() protected method

protected GetOpenConnection ( ) : IDbConnection
return IDbConnection

GetReleaseInfoByPath() public method

public GetReleaseInfoByPath ( string path ) : List
path string
return List

IdentifyProjectVersion() public method

public IdentifyProjectVersion ( string projectPath ) : ProjectInstallInfo
projectPath string
return ProjectInstallInfo

ProjectUpgradeService() public method

public ProjectUpgradeService ( ) : System
return System

Upgrade() public method

public Upgrade ( IProject sourceProject, IProject baseProject, IProject targetProject ) : UpgradeReport
sourceProject IProject
baseProject IProject
targetProject IProject
return UpgradeReport

Property Details

GetModelUpgradeServices public_oe property

This is a temporary measure to inject IModelUpgradeService instances until the implementations can be moved to the proper assemblies and accessed through IModel.GetModelService(). This allows the project upgrade service to be a purely additive change for now that can be version controlled elsewhere.
public Func,IEnumerable> GetModelUpgradeServices
return IEnumerable>.Func

_registeredBundles protected_oe property

protected Dictionary _registeredBundles
return BundleInfo>.Dictionary

_registeredProjects protected_oe property

protected Dictionary _registeredProjects
return RegisteredProjectInfo>.Dictionary