среда, 15 июня 2011 г.

Plugin Mashup: whole folder posting functionality

Hi,

instead of bulky code like:

public class PluginMashupRepository : IPluginMashupRepository
{
public PluginMashup[] PluginMashups
{
get {
return new PluginMashup[] {
new PluginProfileEditorMashup(new[]
{
@".\UI\Mashups\navigator.js",
@".\UI\Mashups\editor.template.js",
@".\UI\Mashups\jquery.utils.js",
@".\UI\Mashups\profileNameSource.js",
@".\UI\Mashups\profilerepository.js",
@".\UI\Mashups\commandGateway.js",
@".\UI\Mashups\errorMessageContainer.js",
@".\UI\Mashups\SubversionProfileEditor.js",
@".\UI\Mashups\registerMashup.js"
})
};
}
}
}

We can use:

public class PluginMashupRepository : IPluginMashupRepository
{
public PluginMashup[] PluginMashups
{
get { return new PluginMashup[] {new PluginProfileEditorMushupFolder(@"UI\Mashups")}; }
}
}


A class PluginProfileEditorMushupFolder was introduced in Plugin SDK in order to simplify whole folder content posting because usually we need to update this repository as UI/Mashup folder is changing.

Комментариев нет:

Отправить комментарий