Table of Contents

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

string

FileExtension

Gets the file extension. E. g. 'py' or 'txt'.

string FileExtension { get; }

Property Value

string

Remarks

Note that we use the extension here without a dot ('.').

Icon

Gets the icon.

Uri Icon { get; }

Property Value

Uri

Methods

CanAddToItem(IProjectItem)

Checks if a new item can be added to a parent item.

bool CanAddToItem(IProjectItem item)

Parameters

item IProjectItem

Parent 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 string

Name of the new item.

parent IProjectItem

Parent 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 string

The new name.

parent IProjectItem

The parent item.

Returns

IEnumerable<ValidationResult>

An enumeration of validation results.