Пример #1
0
        public void Start(Action <Action <IPluginRegistration> > pluginRegistra)
        {
            pluginRegistra(r =>
            {
                var assembly = typeof(JokesPluginBootstrapper).Assembly;

                r.SetPluginInformation(PluginInformation.With(
                                           PluginId.From(assembly),
                                           PluginTitle.With("Jokes"),
                                           PluginVersion.From(assembly),
                                           PluginDescription.With("Provides jokes"),
                                           r.Uri));
                r.RegisterHttpApi(new JokesApi(r.ConfigApi, r.HttpApi, r.MessageApi));
                r.RegisterHttpApiCommands();
            });
        }
Пример #2
0
        public void Start(Action <Action <IPluginRegistration> > pluginRegistra)
        {
            pluginRegistra(r =>
            {
                var assembly = typeof(HelpPluginBootstrapper).Assembly;

                r.SetPluginInformation(PluginInformation.With(
                                           PluginId.From(assembly),
                                           PluginTitle.With("Help"),
                                           PluginVersion.From(assembly),
                                           PluginDescription.With("Provides help for the Borg"),
                                           r.Uri));
                r.RegisterHttpApi(new HelpApi(r.HttpApi, r.MessageApi, r.PluginApi));
                r.RegisterHttpApiCommands();
            });
        }
Пример #3
0
        public void Start(Action <Action <IPluginRegistration> > pluginRegistra)
        {
            pluginRegistra(r =>
            {
                var assembly            = typeof(GitHubPluginBootstrapper).Assembly;
                var gitHubClientFactory = new GitHubClientFactory(r.ConfigApi);
                var gitHubService       = new GitHubService(gitHubClientFactory);

                r.SetPluginInformation(PluginInformation.With(
                                           PluginId.From(assembly),
                                           PluginTitle.With("GitHub"),
                                           PluginVersion.From(assembly),
                                           PluginDescription.With("Provides GitHub support for the Borg"),
                                           r.Uri));
                r.RegisterHttpApi(new GitHubApi(r.MessageApi, gitHubService));
                r.RegisterHttpApiCommands();
            });
        }