CodeSnippet Class
Represents a code snippet.
public class CodeSnippet : ICodeSnippet, ICodeSnippetMetadata
- Inheritance:
- object object
- Implements:
- ICodeSnippet ICodeSnippetMetadata
Constructors
CodeSnippet()
Initializes a new instance of the CodeSnippet
class.
public CodeSnippet()
Properties
Author
Gets or sets the name of the code snippet author.
CodeDelimiter
Gets or sets the character used to describe literals and objects in the code.
public string CodeDelimiter { get; set; }
Property Value
- string:
The character used to describe literals and objects in the code.
CodeKind
Gets or sets a CodeSnippetKind indicating the kind of code contained by the snippet.
public CodeSnippetKind CodeKind { get; set; }
Property Value
- CodeSnippetKind:
A CodeSnippetKind indicating the kind of code contained by the snippet.
CodeLanguage
Gets or sets the language in which the snippet's code is written.
public string CodeLanguage { get; set; }
Property Value
- string:
The language in which the snippet's code is written.
CodeText
Gets or sets the code that is inserted when the code snippet is activated.
public string CodeText { get; set; }
Property Value
- string:
The code that is inserted when the code snippet is activated.
Declarations
Gets the collection of declarations.
public IList<ICodeSnippetDeclaration> Declarations { get; }
Property Value
- IList<ICodeSnippetDeclaration>:
The collection of declarations.
Description
Gets or sets descriptive information about the code snippet contents.
public string Description { get; set; }
Property Value
- string:
Descriptive information about the code snippet contents.
HelpUrl
Gets or sets a URL that provides more information about the code snippet.
public string HelpUrl { get; set; }
Property Value
- string:
A URL that provides more information about the code snippet.
ImportedNamespaces
Gets the collection of imported namespaces.
public IList<string> ImportedNamespaces { get; }
Property Value
Keywords
Gets the collection of keywords that describe the code snippet.
public IList<string> Keywords { get; }
Property Value
References
Gets the collection of assembly references.
public IList<ICodeSnippetAssemblyReference> References { get; }
Property Value
- IList<ICodeSnippetAssemblyReference>:
The collection of assembly references.
Shortcut
Gets or sets the shortcut text used to insert the code snippet.
public string Shortcut { get; set; }
Property Value
- string:
The shortcut text used to insert the code snippet.
SnippetTypes
Gets the types of actions that can be performed by the code snippet.
public CodeSnippetTypes SnippetTypes { get; set; }
Property Value
- CodeSnippetTypes:
A CodeSnippetTypes that specifies the types of actions that can be performed by the code snippet.
Tag
Gets or sets the object that contains user-defined data about the object.
public object Tag { get; set; }
Property Value
Remarks
Any type derived from the object class can be assigned to this property.
Title
Gets or sets the code snippet title.