We have a situation where our adapter (Assembly A) gets data from a
database and gives the data to an internal service (Assembly B) which
then gives it to the client (Assembly C). By the time it reaches
Assembly C, the source information of where the data came from is lost.
In other words, Assembly A knows the data came from the database and
that the data item was called "NUM_OF_PAR TS". Assembly C simply knows
the data as myInfo.ItemCoun t. Now, if Assembly C logs an error, it
will only know to log something like "error processing
myInfo.ItemCoun t". What would be nice is if Assembly C knew where
ItemCount came from and therefore could log something like "error
processing myInfo.ItemCoun t which came from database XYZ, Table 123,
Field "NUM_OF_PAR TS" with SQL of "select * from....".
Any ideas on how to do this? What would be really nice is to inherit
from "int" and then add a source property. But "int" is a value type
and, therefore, is not like an object.
database and gives the data to an internal service (Assembly B) which
then gives it to the client (Assembly C). By the time it reaches
Assembly C, the source information of where the data came from is lost.
In other words, Assembly A knows the data came from the database and
that the data item was called "NUM_OF_PAR TS". Assembly C simply knows
the data as myInfo.ItemCoun t. Now, if Assembly C logs an error, it
will only know to log something like "error processing
myInfo.ItemCoun t". What would be nice is if Assembly C knew where
ItemCount came from and therefore could log something like "error
processing myInfo.ItemCoun t which came from database XYZ, Table 123,
Field "NUM_OF_PAR TS" with SQL of "select * from....".
Any ideas on how to do this? What would be really nice is to inherit
from "int" and then add a source property. But "int" is a value type
and, therefore, is not like an object.
Comment