-
Notifications
You must be signed in to change notification settings - Fork 0
Creating and Running Your First Plugin
thecopy edited this page Jun 4, 2013
·
1 revision
Install-Package Controll.Client -pre
Make sure you have the following package feeds:
- https://nuget.org/api/v2/
- https://www.myget.org/F/controll/
- http://www.myget.org/F/owin
- http://www.myget.org/F/aspnetwebstacknightly/
- http://www.myget.org/F/katana
Note: a plugin can contain many activities. The .dll-file (the assembly) is the plugin.
This is a sample activity. Remember to add a using reference to Controll.Client.
public class SampleActivity : IActivity
{
public void Execute(IActivityContext context)
{
context.Message(ActivityMessageType.Notification, "Hello World!");
}
public ActivityViewModel ViewModel { get { return _viewModel; } }
private readonly ActivityViewModel _viewModel = new ActivityViewModel
{
Key = Guid.Parse("3F7DB79F-A596-4A1A-852F-1B0EF287D479"),
Name = "Hello World",
Description = "An activity which says hello!",
CreatorName = "Creator",
LastUpdated = DateTime.Parse("2013-04-25"),
Version = new Version(1,0,0,0),
Commands = new List<ActivityCommandViewModel>{
new ActivityCommandViewModel{
Label = "Hello!",
Name = "hello"
}
}
};
}
The easiest way to try it out is to use http://controll.apphb.com/. This is a free Controll service which anyone can use.
- Register yourself (no email or confirmation needed)
- Add a zombie
- Connect with the SimpleConsoleZombie as this zombie
- Send the .dll-file to the zombie using the web-interface
- Run it!