c# - Why does my Web API / REST / Windsor code get routed in this direction? -
i not able provide enough information/insight answer question absolutely, i'm hoping, giving best overview can of dilemma, thrown bone crunchy , marrowful enough of help.
i'm trying trace path rest call takes through code can see how can it, @ point, go here instead of there (where going).
specifically, don't know why getcount() method here:
namespace nrbq.client { public class restnrbqdelivery : inrbqdelivery { inrbqclientsettings nrbqclientsettings; irestapiclient restapiclient; public restnrbqdelivery(irestapiclient restapiclient, inrbqclientsettings nrbqclientsettings) { this.nrbqclientsettings = nrbqclientsettings; this.restapiclient = restapiclient; } public restnrbqdelivery(irestapiclient restapiclient, inrbqclientsettings nrbqclientsettings, authenticationheadervalue authheader) { this.nrbqclientsettings = nrbqclientsettings; this.restapiclient = restapiclient; this.restapiclient.authheader = authheader; } public int getcount() { var res = restapiclient.get<int>(0 , new uri(nrbqclientsettings.nrbqapi) , "api/deliveries/count" ); if (res.status != requestresultstatus.success) { throw new exception(res.message); } return res.result; } ...calls this:
namespace seastore.data.legacy.nrbq { public class nrbqsqlrepository : inrbqrepositoryinterface { private inrbqrepositorysettings settings; private imsaccesshelper msaccesshelper; public nrbqsqlrepository(inrbqrepositorysettings settings, imsaccesshelper msaccesshelper) { this.settings = settings; this.msaccesshelper = msaccesshelper; } public int getnrbqentity() { . . . // method called i prefer call class, lives beneath same folder code above:
namespace seastore.data.legacy.nrbq { public class nrbqdeliveryrepository : inrbqdeliveryrepository { private inrbqrepositorysettings settings; private imsaccesshelper msaccesshelper; public nrbqdeliveryrepository(inrbqrepositorysettings settings, imsaccesshelper msaccesshelper) { this.settings = settings; this.msaccesshelper = msaccesshelper; } public int getcount() { return 42; // <= want go here, not sibling } again, tip of meltburg, , know it's unreasonable expect answer tidbit of info, but: there tool or procedure can suss out why path through code takes fork rather other?
Comments
Post a Comment