C# Class NugetCracker.Components.CSharp.CSharpProject

Inheritance: IProject
Show file Open project: monoman/NugetCracker

Protected Properties

Property Type Description
_assemblyInfoPath string
_assemblyName string
_isWeb bool
_projectDir string
_targetFrameworkVersion string

Private Properties

Property Type Description
AddNuspecToProject void
AddSingleLibReference string
AddToPackagesConfig void
AdjustNuspec void
CreateDirectory string
DisableNugetPowerToolsActions string
DoAddNuget void
ExtractProjectProperty string
FindPackagesDir string
GetListForTag IEnumerable
GetListOfReferencedLibraries IEnumerable
GetListOfReferencedProjects IEnumerable
GetListOfSources IEnumerable
IsEqual bool
ParseAssemblyInfoFile bool
ParseProjectFile void
ProcessBuildOutput void
TranslateType string
UpdatePackagesConfig void

Public Methods

Method Description
AddNoneFile ( string xml, string fileToAdd ) : string
AddNuget ( ILogger logger, INugetSpec nugetComponent, IComponentFinder components, string packagesOutputDirectory ) : bool
AddParent ( ISolution solution ) : void
AdjustElements ( string xml, string tags, string licenseUrl, string projectUrl, string iconUrl, string copyright, bool requireLicenseAcceptance ) : string
Build ( ILogger logger ) : bool
CSharpProject ( string projectFileFullPath ) : System
DeployTo ( ILogger logger, string path ) : bool
Equals ( IReference other ) : bool
Equals ( object obj ) : bool
FixPackageReference ( string xml, string packageName, string version, string platform ) : string
GetHashCode ( ) : int
InstallPackageDependencyFromSources ( ILogger logger, IReference dependency, string sourceDirectories = null, bool force = false ) : bool
MatchName ( string pattern ) : bool
PartToCascadeBump ( VersionPart partBumpedOnDependency ) : VersionPart
PromoteToNuget ( ILogger logger, string outputDirectory, string tags, string licenseUrl = null, string projectUrl = null, string iconUrl = null, string copyright = null, bool requireLicenseAcceptance = false ) : IComponent
RemoveParent ( ISolution solution ) : void
ReplaceProjectByNuget ( string xml, string packageName, string assemblyName, string framework, string installedPackagesDir ) : string
ReplaceProjectByNuget ( INugetSpec package, string assemblyName, string framework ) : void
ReplaceProjectReference ( ILogger logger, INugetSpec package, string assemblyName, string framework, ICollection installDirs ) : bool
SetNewVersion ( ILogger logger, System.Version version ) : bool
ToLongString ( ) : string
ToString ( ) : string
UpgradePackageDependency ( ILogger logger, IComponent newPackage, string sourceDirectory, ICollection installDirs ) : bool

Protected Methods

Method Description
GetProjectName ( string projectFileFullPath ) : string
ParseAssemblyInfo ( IEnumerable sourceFilesList ) : void
ParseAvailableData ( ) : void
ParsePackagesFile ( ) : void
UpdatePackageReferencesOnProject ( ILogger logger, IReference newPackage ) : void

Private Methods

Method Description
AddNuspecToProject ( string nuspec ) : void
AddSingleLibReference ( string xml, string packageName, string assemblyName, string framework, string installedPackagesDir ) : string
AddToPackagesConfig ( IComponent newPackage, string packagesFile ) : void
AdjustNuspec ( string nuspec, string tags, string licenseUrl, string projectUrl, string iconUrl, string copyright, bool requireLicenseAcceptance ) : void
CreateDirectory ( string dir ) : string
DisableNugetPowerToolsActions ( string xml ) : string
DoAddNuget ( ILogger logger, INugetSpec nugetComponent, IComponentFinder components, string packagesOutputDirectory, bool firstlevel ) : void
ExtractProjectProperty ( System.Xml.Linq.XDocument project, System.Xml.Linq.XName name, string @default ) : string
FindPackagesDir ( string dir ) : string
GetListForTag ( System.Xml.Linq.XDocument project, System.Xml.Linq.XNamespace nm, string tagName ) : IEnumerable
GetListOfReferencedLibraries ( System.Xml.Linq.XDocument project, System.Xml.Linq.XNamespace nm ) : IEnumerable
GetListOfReferencedProjects ( System.Xml.Linq.XDocument project, System.Xml.Linq.XNamespace nm ) : IEnumerable
GetListOfSources ( System.Xml.Linq.XDocument project, System.Xml.Linq.XNamespace nm ) : IEnumerable
IsEqual ( IReference other ) : bool
ParseAssemblyInfoFile ( string sourcePath ) : bool
ParseProjectFile ( ) : void
ProcessBuildOutput ( ILogger logger, string line ) : void
TranslateType ( bool usesNUnit, string targetType ) : string
UpdatePackagesConfig ( IComponent newPackage, string packagesFile ) : void

Method Details

AddNoneFile() public static method

public static AddNoneFile ( string xml, string fileToAdd ) : string
xml string
fileToAdd string
return string

AddNuget() public method

public AddNuget ( ILogger logger, INugetSpec nugetComponent, IComponentFinder components, string packagesOutputDirectory ) : bool
logger ILogger
nugetComponent INugetSpec
components IComponentFinder
packagesOutputDirectory string
return bool

AddParent() public method

public AddParent ( ISolution solution ) : void
solution ISolution
return void

AdjustElements() public static method

public static AdjustElements ( string xml, string tags, string licenseUrl, string projectUrl, string iconUrl, string copyright, bool requireLicenseAcceptance ) : string
xml string
tags string
licenseUrl string
projectUrl string
iconUrl string
copyright string
requireLicenseAcceptance bool
return string

Build() public method

public Build ( ILogger logger ) : bool
logger ILogger
return bool

CSharpProject() public method

public CSharpProject ( string projectFileFullPath ) : System
projectFileFullPath string
return System

DeployTo() public method

public DeployTo ( ILogger logger, string path ) : bool
logger ILogger
path string
return bool

Equals() public method

public Equals ( IReference other ) : bool
other IReference
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

FixPackageReference() public static method

public static FixPackageReference ( string xml, string packageName, string version, string platform ) : string
xml string
packageName string
version string
platform string
return string

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetProjectName() protected method

protected GetProjectName ( string projectFileFullPath ) : string
projectFileFullPath string
return string

InstallPackageDependencyFromSources() public method

public InstallPackageDependencyFromSources ( ILogger logger, IReference dependency, string sourceDirectories = null, bool force = false ) : bool
logger ILogger
dependency IReference
sourceDirectories string
force bool
return bool

MatchName() public method

public MatchName ( string pattern ) : bool
pattern string
return bool

ParseAssemblyInfo() protected method

protected ParseAssemblyInfo ( IEnumerable sourceFilesList ) : void
sourceFilesList IEnumerable
return void

ParseAvailableData() protected method

protected ParseAvailableData ( ) : void
return void

ParsePackagesFile() protected method

protected ParsePackagesFile ( ) : void
return void

PartToCascadeBump() public method

public PartToCascadeBump ( VersionPart partBumpedOnDependency ) : VersionPart
partBumpedOnDependency VersionPart
return VersionPart

PromoteToNuget() public method

public PromoteToNuget ( ILogger logger, string outputDirectory, string tags, string licenseUrl = null, string projectUrl = null, string iconUrl = null, string copyright = null, bool requireLicenseAcceptance = false ) : IComponent
logger ILogger
outputDirectory string
tags string
licenseUrl string
projectUrl string
iconUrl string
copyright string
requireLicenseAcceptance bool
return IComponent

RemoveParent() public method

public RemoveParent ( ISolution solution ) : void
solution ISolution
return void

ReplaceProjectByNuget() public static method

public static ReplaceProjectByNuget ( string xml, string packageName, string assemblyName, string framework, string installedPackagesDir ) : string
xml string
packageName string
assemblyName string
framework string
installedPackagesDir string
return string

ReplaceProjectByNuget() public method

public ReplaceProjectByNuget ( INugetSpec package, string assemblyName, string framework ) : void
package INugetSpec
assemblyName string
framework string
return void

ReplaceProjectReference() public method

public ReplaceProjectReference ( ILogger logger, INugetSpec package, string assemblyName, string framework, ICollection installDirs ) : bool
logger ILogger
package INugetSpec
assemblyName string
framework string
installDirs ICollection
return bool

SetNewVersion() public method

public SetNewVersion ( ILogger logger, System.Version version ) : bool
logger ILogger
version System.Version
return bool

ToLongString() public method

public ToLongString ( ) : string
return string

ToString() public method

public ToString ( ) : string
return string

UpdatePackageReferencesOnProject() protected method

protected UpdatePackageReferencesOnProject ( ILogger logger, IReference newPackage ) : void
logger ILogger
newPackage IReference
return void

UpgradePackageDependency() public method

public UpgradePackageDependency ( ILogger logger, IComponent newPackage, string sourceDirectory, ICollection installDirs ) : bool
logger ILogger
newPackage IComponent
sourceDirectory string
installDirs ICollection
return bool

Property Details

_assemblyInfoPath protected property

protected string _assemblyInfoPath
return string

_assemblyName protected property

protected string _assemblyName
return string

_isWeb protected property

protected bool _isWeb
return bool

_projectDir protected property

protected string _projectDir
return string

_targetFrameworkVersion protected property

protected string _targetFrameworkVersion
return string