.net - Version-sensitive ObsoleteAttribute -
the [obsolete] attribute handy marking classes have been deprecated in favor of better implementations, isn't sensitive version of .net project targeting.
for example, i'm using home-rolled threadsafedictionary class versions of .net before 4.0. when .net 4.0 came out included new class called concurrentdictionary. i'd able mark threadsafedictionary [obsolete] only if project being compiled .net 4.0. doesn't appear stock obsoleteattribute supports controlling compiler's warnings framework version.
is there way this?
i guess roll out custom attribute , create post-build process examines compiled code through reflection searching attribute.
Comments
Post a Comment