Interface IProjectItemTemplate
- Namespace
- Loehnert.Lisrt.Scripting.Project.ProjectItem.Interfaces
- Assembly
- Loehnert.Lisrt.Scripting.dll
Interface for a project item template.
public interface IProjectItemTemplate
Properties
Description
Gets the localized description.
string Description { get; }
Property Value
FileExtension
Gets the file extension. E. g. 'py' or 'txt'.
string FileExtension { get; }
Property Value
Remarks
Note that we use the extension here without a dot ('.').
Icon
Gets the icon.
Uri Icon { get; }
Property Value
Methods
CanAddToItem(IProjectItem)
Checks if a new item can be added to a parent item.
bool CanAddToItem(IProjectItem item)
Parameters
item
IProjectItemParent item.
Returns
- bool
A value indicating whether a new item can be added to
item
.
CreateAndAddItem(string, IProjectItem)
Creates a new item with name
and adds it to parent
.
IProjectItem CreateAndAddItem(string name, IProjectItem parent)
Parameters
name
stringName of the new item.
parent
IProjectItemParent to add the new item.
Returns
- IProjectItem
The new item.
ValidateNewName(string, IProjectItem)
Gets the validation results of the new name of the item.
IEnumerable<ValidationResult> ValidateNewName(string newName, IProjectItem parent)
Parameters
newName
stringThe new name.
parent
IProjectItemThe parent item.
Returns
- IEnumerable<ValidationResult>
An enumeration of validation results.