Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Custom extension properties appearance



  • Hi!

    A custom extension I wrote depends on Subversion extension. Now, in order to obtain configuration settings (like username and password) one would need to call Providers_GetProvider(int? Provider_Id) (look at: http://www.inedo.com/support/sdk-reference/Inedo.BuildMaster.Data.StoredProcedures/Providers_GetProvider ) to obtain an object and then call Execute().Provider_Config to obtain configuration object.

    I have checked the database table Providers and noticed that the provider I want to use has ID 11. However, as I am not that keen on binding my extension to a single subversion provider, I do wonder if there is a possibility to use a nice provider selector (like the one Subversion plugin is using) to select a provider and get id that way?

    Also, I would like to get some help regarding, how to make a path selector field instead of a plain text one.



  • Hi Vladimir,

    The built-in source control actions (Get Latest, Get Labeled, Tag, Label, etc) all inherit from the ProviderBasedAction<SourceControlProviderBase> class. This will help provide some editor support (like the selector), and also gives you more easy access to fields. So... you may want to consider using that instead.

    If you're curious how any of the actions we have work (or would like to base an action on one we have), just use the Source Control Request Form (http://inedo.com/company/source-code-request ) and we'll be glad to send you the code.



  • Hi Alex,

    So, if I change action inheritance from CommandLineActionBase to ProviderBasedAction<SourceControlProviderBase> it should work?

    Never mind... I'll make code inquiry :)

    thank you for your answer



  • Code sent! hope this helps. A general rule of thumb...

    An action that inherits from ProviderBasedAction<T> is designed to run an operation on a single provider (Issue, Source Control, Database, etc). The provider and action plumbing take care of the agent and cross-platform things.

    If the provider doesn't already do what you want it to, then it's almost always easier to just run a command-line action (CommandLineActionBase), as that takes care of all the process logging and other things.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation