开发者

Is it possible to extend web matrix with plugins?

开发者 https://www.devze.com 2023-02-09 19:27 出处:网络
The new Webmatrix is a cool and free development开发者_JS百科 environment. Does it have any extension points to add new functionality?With Webmatrix 2.0 Beta and later there is an extensibility framew

The new Webmatrix is a cool and free development开发者_JS百科 environment. Does it have any extension points to add new functionality?


With Webmatrix 2.0 Beta and later there is an extensibility framework in place for adding "Extensions." The API is quite simple at present but it appears you can create any arbitrary managed code and include in your constructor where you inherit the Microsoft.WebMatrix.Extensibility.IExtension interface.

Here's a snippet to get you started based on my simple Extension:

[Export(typeof(IExtension))]
public class UmbracoExtension :  IExtension
{
    public IEnumerable<IDashboardItem> DashboardItems
    {
        get { return null; }
    }
    public string Name
    {
        get { return "Extension"; }
    }
    public string Version
    {
        get { return "1.0"; }
    }
    private IRibbonGroup _ribbonGroup;
    private IWebMatrixHost _webMatrixHost;
    private List<IRibbonItem> _ribbonItems;

    public IEnumerable<IRibbonItem> RibbonItems
    {
...
    }


    [Import(typeof(IWebMatrixHost))]
    private IWebMatrixHost WebMatrixHost
    {
...
    }

-Paul


WebMatrix does not support any extensibility (such as plugins) in version 1.0.


The feature I miss most with WebMatrix 2.0 is not being able to toggle commenting of lines of code but it sure is maturing as an outstanding CMS.


Clinton: You can actually comment and uncomment lines using Ctrl-K-C and Ctrl-K-U keyboard shortcuts.

Others: For more information on extensibility: http://extensions.webmatrix.com/documentation

0

精彩评论

暂无评论...
验证码 换一张
取 消