mo.notono.us

Thursday, January 10, 2008

LiveWriter: Testing CodeSnippet Plugin

Leo Vildosola has written a Code Snippet Plugin for Windows Live Writer.  It looks like it works quite nicely - here is the code from my Extension Methods Post:

/// <summary>
/// Creates a list based on the specified title, description, URL, Feature ID, template type, document template type, and options for displaying a link to the list in Quick Launch.
/// </summary>
/// <param name="listCollection">The list collection.</param>
/// <param name="title">The title.</param>
/// <param name="description">The description.</param>
/// <param name="featureId">The feature id.</param>
/// <param name="templateType">The template type.</param>
/// <param name="docTemplateType">The doc template type.</param>
/// <param name="quickLaunchOptions">The quick launch options.</param>
/// <returns>A GUID that identifies the new list.</returns>
public static Guid Add(this SPListCollection listCollection, string title, string description, string url, Guid featureId, 
    SPListTemplateType templateType, int docTemplateType, SPListTemplate.QuickLaunchOptions quickLaunchOptions)
{
    return listCollection.Add(title, description, url, featureId.ToString("B").ToUpper(), 
        (int)templateType, docTemplateType.ToString(), quickLaunchOptions);
}

(via Frank's World)

Labels: , , ,

1 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home