I am writing a descendant of FileStream which deals transparently with files with meta-data bytes (raw reads from flash chips for example). It automatically skips over the metadata bytes so that the other data does not get fragmented.
The functionality of the class is coming along nicely, but I'm being careful to override any of FileStream's methods which may break the functionality and I've come to CreateObjRef() and I'm not sure a) what to do and b) if I even have to.
I gather it's to do remoting and I'm the only one who is currently going to use the class and I'm fairly sure I won't need it, so I'm tempted to just make it throw NotImplementedException but I'm keen to do things as "properly" as possible - so I'm looking for guidance - any that can be offered would be very appreciated!
(I'm targeting .NET 3.5 in case that makes a difference to the approach.)
MSDN says:
The CreateObjRef method is called by remote object creation methods such as AppDomain.CreateInstance and AppDomain.CreateInstanceAndUnwrap. In most cases, there is no need to override this method.
(emphasis added)