making imports accessible around your code
in usage, i have garland imports i wish accessible tools code. something like:
[export (typeof (ibarprovider))]
class mybarfactory : ibarpovider
{
[import]
open ifoo1service ifoo1service { get; set; }
[import]
open ifoo2service ifoo2service { get; set; }
[import]
open ifoo3service ifoo3service { get; set; }
[import]
open ifoo4service ifoo4service { get; set; }
[import]
open ifoo5service ifoo5service { get; set; }
open ibar createbar()
{
relapse new barimplementation(/* wish pass alien services here */);
}
}
class barimplementation : ibar
{
readonly zib zib;
open barimplementation(/* ... */)
{
this.zib = new zib(/* pass services here, too */);
}
}
i pass any alien use an sole parameter, nonetheless it's lot tedious code. there's gotta something better. any ideas?
Comments
Post a Comment