Table of Contents

Class SolutionFolder

Namespace
SunamoDevCode.SunamoSolutionsIndexer.Data.SolutionFolderNs
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

source SolutionFolderSerialize

Source solution folder data.

Properties

CountOfImages

Gets or sets the count of images in the solution.

public int CountOfImages { get; set; }

Property Value

int

InVsFolder

Gets or sets a value indicating whether the solution is in Visual Studio folder.

public bool InVsFolder { get; set; }

Property Value

bool

ModulesNotSelling

Gets or sets modules not for selling in format solution name\project name\module name.

public List<string> ModulesNotSelling { get; set; }

Property Value

List<string>

ModulesSelling

Gets or sets modules for selling in format solution name\project name\module name.

public List<string> ModulesSelling { get; set; }

Property Value

List<string>

NameSolutionWithoutDiacritic

Gets or sets the solution name without diacritics.

public string NameSolutionWithoutDiacritic { get; set; }

Property Value

string

ProjectsGetCsprojs

Gets or sets projects from SolutionFolder.GetCsprojs method.

public List<string> ProjectsGetCsprojs { get; set; }

Property Value

List<string>

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

List<string>

Repository

Gets or sets the repository location.

public RepositoryLocal Repository { get; set; }

Property Value

RepositoryLocal

SlnNameWithoutExtension

Gets or sets the solution name without extension.

public string? SlnNameWithoutExtension { get; set; }

Property Value

string

SourceOfProjects

Gets or sets the source of projects (SolutionFolder.GetCsprojs or SolutionsIndexerHelper.ProjectsInSolution).

public SourceOfProjects SourceOfProjects { get; set; }

Property Value

SourceOfProjects

Type

Gets the type of SolutionFolder class.

public static Type Type { get; }

Property Value

Type

TypeProjectFolder

Gets or sets the type of project folder (C# Projects, PHP PHP_Projects, etc.).

public ProjectsTypes TypeProjectFolder { get; set; }

Property Value

ProjectsTypes

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

solution SolutionFolder

Solution folder.

projectDistinction string

Project distinction (.Wpf, .Cmd, etc.).

standaloneSlnForProject bool

Whether to create standalone solution for project.

addProtectedWhenSelling bool

Whether to add protected when selling.

publish bool

Whether 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

logger ILogger

Logger instance.

solutionFolder SolutionFolder

Solution folder to process.

args GetCsprojsArgs

Arguments 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

logger ILogger

Logger instance.

toSelling PpkOnDriveDC

PPK 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

left SolutionFolder

First solution folder.

right SolutionFolder

Second 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

left SolutionFolder

First solution folder.

right SolutionFolder

Second solution folder.

Returns

bool

True if left has fewer images than right.