Class PartialViewMacroSnippetCollection
The collection of partial view macro snippets.
Namespace: Umbraco.Cms.Core.Snippets
Assembly: Umbraco.Core.dll
Syntax
public class PartialViewMacroSnippetCollection : BuilderCollectionBase<ISnippet>, IBuilderCollection<ISnippet>
  Constructors
View SourcePartialViewMacroSnippetCollection(Func<IEnumerable<ISnippet>>)
Declaration
public PartialViewMacroSnippetCollection(Func<IEnumerable<ISnippet>> items)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Func<IEnumerable<ISnippet>> | items | 
Methods
View SourceGetContentFromName(String)
Gets the content of a partial view macro snippet as a string.
Declaration
public string GetContentFromName(string snippetName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | snippetName | The name of the snippet.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | The content of the partial view macro.  | 
      
GetNames()
Gets the partial view macro snippet names.
Declaration
public IEnumerable<string> GetNames()
  Returns
| Type | Description | 
|---|---|
| IEnumerable<System.String> | The names of all partial view macro snippets.  |