locked
Non IPlugin classes in plugins assembly RRS feed

  • Question

  • I have one assembly with several plugins. These plugins use one non Iplugin class for some actions with several methods. This is correct or bad?

    public void Execute(IServiceProvider serviceProvider)
    {

    //some code

    Class  class1= new Class();

    var a =class.sum(a,b);

    }

    class Class {

    public int sum(a,b){

    //some code

    }

    }




    • Edited by WhiteBlack1 Tuesday, April 22, 2014 5:16 AM
    Tuesday, April 22, 2014 5:13 AM

Answers

  • Hi,

        What you are doing is not a bad practice. This is what we generally do. The entry points for the class will be in the separate class and the logic would be separated in an individual file to allow re-use.


    Hope this helps.
     
    -----------------------------------------------------------------------
     Minal Dahiya
    blog : http://minaldahiya.blogspot.com.au/

     
    If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    • Marked as answer by WhiteBlack1 Tuesday, April 22, 2014 7:02 AM
    Tuesday, April 22, 2014 5:50 AM