Is there a recommended Attribute
in the .Net Framework for marking code as "Not supported"?
So far I have been using ObsoleteAttribute
but it's not always entirely accurate. For example at the moment I am writing a managed FMOD wrapper and I want to clearly mark properties, enum values etc which only apply to unsupported platforms.
Say I have something like an enum for determining the format of an audio file. I want to make it clear that, for the .Net port at least, certain values are not relevant. For example:
enum SoundFormat{
Wav,
Mp3,
OggVorbis,
[Obsolete("Xbox360 only")] Xma,
[Obsolete("GameCube only")] GcadPcm,
[Obsolete("PS2/PSP only")] Vag,
}
While using Obsolete
works and kind of serves the same purpose, it's also misleading as they're not technically obsolete by being unsupported. It's one of those things which are ultimately of little consequence but it keeps bugging me every time I put Obsolete
where it's inaccurate.
PS: before it's suggested, NotImplementedException
and NotSupportedException
really do not answer the question as they only provide run-time guidance. I'm more interested in compile-time.