Class ProjectFile
- Namespace
- Tlumach.Validation
- Assembly
- Tlumach.dll
A file that a project includes, as the IDE or MSBuild reports it.
public sealed class ProjectFile
- Inheritance
-
ProjectFile
- Inherited Members
Constructors
ProjectFile(string, string?, string?, IReadOnlyDictionary<string, string>?)
Initializes a new instance of the ProjectFile class.
public ProjectFile(string fullPath, string? itemType, string? link = null, IReadOnlyDictionary<string, string>? metadata = null)
Parameters
fullPathstringThe full path of the file.
itemTypestringThe MSBuild item type, such as
AdditionalFiles,EmbeddedResource, orNone.linkstringThe path at which the project shows the file, relative to the project directory, when it differs from the location of the file (the
Linkmetadata of a linked file); otherwise null.metadataIReadOnlyDictionary<string, string>The MSBuild metadata of the item, such as
TypeorLogicalName, or null when they are not known. The validation uses them to check how ResX translations are embedded; when they are not known, that check is skipped.
Fields
AdditionalFilesItemType
The item type of the items that the Tlumach generator processes.
public const string AdditionalFilesItemType = "AdditionalFiles"
Field Value
EmbeddedResourceItemType
The item type of the files that a project embeds into its assembly.
public const string EmbeddedResourceItemType = "EmbeddedResource"
Field Value
Properties
FullPath
Gets the full path of the file.
public string FullPath { get; }
Property Value
IsEmbeddedResource
Gets a value indicating whether the project embeds the file into its assembly (the item type is EmbeddedResource).
public bool IsEmbeddedResource { get; }
Property Value
IsGeneratorInput
Gets a value indicating whether the generator processes the file (the item type is AdditionalFiles).
public bool IsGeneratorInput { get; }
Property Value
ItemType
Gets the MSBuild item type.
public string ItemType { get; }
Property Value
Link
Gets the path at which the project shows a linked file, relative to the project directory, or null for a file that the project shows where it is. The name of an embedded resource follows this path.
public string? Link { get; }
Property Value
Metadata
Gets the MSBuild metadata of the item (compared without regard to case), or null when they are not known.
public IReadOnlyDictionary<string, string>? Metadata { get; }