Class CsprojNsHelper
- Namespace
- SunamoCsproj
- Assembly
- SunamoCsproj.dll
public class CsprojNsHelper
- Inheritance
-
CsprojNsHelper
- Inherited Members
- Extension Methods
Fields
KeywordsBeforeFirstCodeElementDeclaration
EN: Keywords that can appear before the first code element declaration. CZ: Klíčová slova která mohou být před první deklarací kódového elementu.
public static string[] KeywordsBeforeFirstCodeElementDeclaration
Field Value
- string[]
Methods
ParseSharpIfToFirstCodeElement(string?, List<string>, List<string>, bool)
EN: Parses #if directives to first code element. This method can be called only when SetAllNamespaces completes, so first check is OK. CZ: Parsuje #if direktivy po první kódový element. Tato metoda se může volat jen když SetAllNamespaces se dokoná, proto ta první kontrola je v pohodě.
public static Task<ParseSharpIfToFirstCodeElementResult> ParseSharpIfToFirstCodeElement(string? pathCs, List<string> content, List<string> AllNamespaces, bool addTo_linked)
Parameters
pathCsstringEN: Path to .cs file or null. CZ: Cesta k .cs souboru nebo null.
contentList<string>EN: File content or null to read from file. CZ: Obsah souboru nebo null pro načtení ze souboru.
AllNamespacesList<string>EN: All namespaces in project. CZ: Všechny jmenné prostory v projektu.
addTo_linkedboolEN: Add to linked files. CZ: Přidat do linkovaných souborů.
Returns
- Task<ParseSharpIfToFirstCodeElementResult>
EN: Parse result. CZ: Výsledek parsování.
ProjectNameFromCsPath(string)
EN: Gets sanitized project name from .cs file path. CZ: Získá sanitizovaný název projektu z cesty k .cs souboru.
public static string ProjectNameFromCsPath(string csPath)
Parameters
csPathstringEN: Path to .cs file. CZ: Cesta k .cs souboru.
Returns
- string
EN: Sanitized project name. CZ: Sanitizovaný název projektu.
SanitizeProjectName(string)
EN: Keeps only letters or digits from the text. CZ: Nechá jen písmena nebo čísla z textu.
public static string SanitizeProjectName(string text)
Parameters
textstringEN: Text to sanitize. CZ: Text k sanitizaci.
Returns
- string
EN: Sanitized text with only alphanumeric characters. CZ: Sanitizovaný text pouze s alfanumerickými znaky.
WriteNew(List<string>, string, List<string>, List<string>)
EN: Writes new #elif directives to .cs file. Parameter reallyOccuredInFilesOrProjectNames is critical - must pass csproj paths, not cs paths, because linked files add elif based on physical project location. CZ: Zapíše do .cs nové #elif direktivy. Parametr reallyOccuredInFilesOrProjectNames je kritický - musí předávat csproj cesty, ne cs cesty, protože linkované soubory přidávají elif podle fyzického umístění projektu.
public static Task WriteNew(List<string> reallyOccuredInFilesOrProjectNames, string pathCsToAppendElif, List<string> contentCs, List<string> AllNamespaces)
Parameters
reallyOccuredInFilesOrProjectNamesList<string>EN: List of files or project names where code really occurs. CZ: Seznam souborů nebo názvů projektů kde se kód skutečně vyskytuje.
pathCsToAppendElifstringEN: Path to .cs file where to append elif directives. CZ: Cesta k .cs souboru kam připojit elif direktivy.
contentCsList<string>EN: Content of .cs file or null to read from file. CZ: Obsah .cs souboru nebo null pro načtení ze souboru.
AllNamespacesList<string>EN: All namespaces in the project. CZ: Všechny jmenné prostory v projektu.