Class SolutionFolder
- Assembly
- SunamoDevCode.dll
Represents a solution folder with projects and modules.
public class SolutionFolder : SolutionFolderSerialize, ISolutionFolderSerialize, ISolutionFolder
- Inheritance
-
SolutionFolder
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
SolutionFolder()
Initializes a new instance of the SolutionFolder class.
public SolutionFolder()
SolutionFolder(SolutionFolderSerialize)
Initializes a new instance of the SolutionFolder class from serialized data.
public SolutionFolder(SolutionFolderSerialize source)
Parameters
sourceSolutionFolderSerializeSource solution folder data.
Properties
CountOfImages
Gets or sets the count of images in the solution.
public int CountOfImages { get; set; }
Property Value
InVsFolder
Gets or sets a value indicating whether the solution is in Visual Studio folder.
public bool InVsFolder { get; set; }
Property Value
ModulesNotSelling
Gets or sets modules not for selling in format solution name\project name\module name.
public List<string> ModulesNotSelling { get; set; }
Property Value
ModulesSelling
Gets or sets modules for selling in format solution name\project name\module name.
public List<string> ModulesSelling { get; set; }
Property Value
NameSolutionWithoutDiacritic
Gets or sets the solution name without diacritics.
public string NameSolutionWithoutDiacritic { get; set; }
Property Value
ProjectsGetCsprojs
Gets or sets projects from SolutionFolder.GetCsprojs method.
public List<string> ProjectsGetCsprojs { get; set; }
Property Value
ProjectsInSolution
Gets or sets projects in solution. Only name without path. Is filled in constructor with CreateSolutionFolder(). Only subfolders. Csproj files must be found out manually. Csproj are available to get with GetCsprojs().
public List<string> ProjectsInSolution { get; set; }
Property Value
Repository
Gets or sets the repository location.
public RepositoryLocal Repository { get; set; }
Property Value
SlnNameWithoutExtension
Gets or sets the solution name without extension.
public string? SlnNameWithoutExtension { get; set; }
Property Value
SourceOfProjects
Gets or sets the source of projects (SolutionFolder.GetCsprojs or SolutionsIndexerHelper.ProjectsInSolution).
public SourceOfProjects SourceOfProjects { get; set; }
Property Value
Type
Gets the type of SolutionFolder class.
public static Type Type { get; }
Property Value
TypeProjectFolder
Gets or sets the type of project folder (C# Projects, PHP PHP_Projects, etc.).
public ProjectsTypes TypeProjectFolder { get; set; }
Property Value
Methods
ExeToRelease(SolutionFolder, string, bool, bool, bool)
Gets the path to the executable to be released.
public string? ExeToRelease(SolutionFolder solution, string projectDistinction, bool standaloneSlnForProject, bool addProtectedWhenSelling = false, bool publish = false)
Parameters
solutionSolutionFolderSolution folder.
projectDistinctionstringProject distinction (.Wpf, .Cmd, etc.).
standaloneSlnForProjectboolWhether to create standalone solution for project.
addProtectedWhenSellingboolWhether to add protected when selling.
publishboolWhether to use publish folder.
Returns
- string
Path to the executable or null if not found.
GetCsprojs(ILogger, SolutionFolder, GetCsprojsArgs?)
Returns csproj full paths in subfolders of solution folder (one depth). Must use SolutionFolder, because in CreateSolutionFolder is filled projects variable. From every folder all csproj files are taken.
public static void GetCsprojs(ILogger logger, SolutionFolder solutionFolder, GetCsprojsArgs? args = null)
Parameters
loggerILoggerLogger instance.
solutionFolderSolutionFolderSolution folder to process.
argsGetCsprojsArgsArguments for getting csproj files.
HaveGitFolder()
Checks whether the solution folder has a .git folder.
public bool HaveGitFolder()
Returns
- bool
True if .git folder exists, otherwise false.
ToString()
Returns the string representation of the solution folder.
public override string ToString()
Returns
- string
String representation including image count if present.
UpdateModules(ILogger, PpkOnDriveDC)
Updates modules in the solution.
public void UpdateModules(ILogger logger, PpkOnDriveDC toSelling)
Parameters
loggerILoggerLogger instance.
toSellingPpkOnDriveDCPPK on drive for selling modules.
Operators
operator >(SolutionFolder, SolutionFolder)
Compares two solution folders by their image count.
public static bool operator >(SolutionFolder left, SolutionFolder right)
Parameters
leftSolutionFolderFirst solution folder.
rightSolutionFolderSecond solution folder.
Returns
- bool
True if left has more images than right.
operator <(SolutionFolder, SolutionFolder)
Compares two solution folders by their image count.
public static bool operator <(SolutionFolder left, SolutionFolder right)
Parameters
leftSolutionFolderFirst solution folder.
rightSolutionFolderSecond solution folder.
Returns
- bool
True if left has fewer images than right.