CodeSnippetFolder Class
Represents a folder that can contain ICodeSnippetProvider objects and other child folders.
public class CodeSnippetFolder : ICodeSnippetFolder
- Inheritance:
- object object
- Implements:
- ICodeSnippetFolder
Constructors
CodeSnippetFolder(string)
Represents a folder that can contain ICodeSnippetProvider objects and other child folders.
public CodeSnippetFolder(string name)
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the folder. |
Properties
Folders
The collection of child folders.
Items
The collection of code snippet metadata items in the folder.
Name
The name of the folder.
Tag
The object that contains user-defined data about the object.
Methods
FindItemByShortcut(string, bool)
Recursively searches for an item with the specified shortcut.
public ICodeSnippetMetadata? FindItemByShortcut(string shortcut, bool isCaseSensitive)
| Parameter | Type | Description |
|---|---|---|
| shortcut | string | The shortcut text. |
| isCaseSensitive | bool | Whether the comparison should be case-sensitive. |
Returns
- ICodeSnippetMetadata:
The ICodeSnippetMetadata that was found, if any.
LoadFrom(string, string)
Creates a CodeSnippetFolder that pre-loads all snippet files found in the specified file system path.
public static ICodeSnippetFolder? LoadFrom(string path, string language)
| Parameter | Type | Description |
|---|---|---|
| path | string | The file system path to recursively examine for snippet files. |
| language | string | The language of snippets to load, if looking for a specific language. Options are |
Returns
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()