Properties
UserCount
#Gets the number of snippets across all user folders. Snippets shipped with the installation are not counted.
UserSnippets
#Gets all snippets which come from user folders, i.e. folders added with
isUser: true. Snippets shipped with the installation are excluded.Methods
AddFolder
#Add a folder containing snippets to this server. The folder is scanned for *.ghz files and a watcher is installed to keep the snippet list in sync with the file system. Duplicate folders are silently ignored.
FindById
#Look up a tracked snippet by its Snippet.Id. Returns null if no match is found.
Parameters:
| id (Guid) |
RemoveFolder
#Remove a folder from this server. Its watcher is disposed and its tracked snippets are forgotten.
Parameters:
| folder (string) |
Returns: True if the folder was being tracked and has now been removed.
Search
#Search all snippets and append them to a result.
Parameters:
| queryFragments (string[]) | Clean search query terms. |
| results (Maths.MaximumSearchMultiple<object>) | Result to append Snippet instances to. |
Events
SnippetsChanged
#Raised whenever the tracked folder list changes, or any folder's snippet list changes.