vb.net - How would I refactor my code to stop passing a class object everywhere? -


i working on improving design of insurance quote engine. there no design documentation involves passing in 'quotedata' class object every sub, , because of design choice object has have number of variables 'reset' doesn't accidentally carry on other scheme-specific code blocks.

after processing input data calls out each scheme engine block, example:

pcengine:

call engine201611pc71(pobjquote) 

engine201611pc71:

call scheme1(pobjquote) 

scheme1:

call arearating(pobjquote) call vehiclegrouprating(pobjquote) call checkouteachdriver(pobjquote) 

it should noted there several scheme subs, each on dozen other sub calls related scheme rules.

ideally want have quotedata instance each scheme quote we're reusing same 1 everything; that's thousands of scheme quotes 1 instance of quotedata.

how go refactoring? struct being passed byref everywhere (with 1000+ members)!


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -