08-29-2008, 4:27
|
Joshua

Joined on 03-12-2008
Munich, Germany
Posts 82
|
AnnCodecs class should be static
|
 
 
|
|
|
The AnnCodecs class in LeadTools v15 .Net only has instance methods defined (i.e. you have to instantiate the object before you can call any methods on it).
The AnnCodecs class takes no constructor arguments, does not provide a Dispose() method (therefore, does not need to be disposed of), and does not have any methods which alter state data within the class. It is, as far as I can see, a helper class.
It would be great if you could turn this into a static class so that I don't have code like the following in my application:
using (MemoryStream annotationsStream = new MemoryStream()) { new AnnCodecs().Save(annotationsStream, m_annotationState, AnnCodecsFormat.Serialize, 1, AnnCodecsSavePageMode.Overwrite); DoSomethingWithAnnotationStream(annotationsStream); }
Regards,
Josh.
|
|
|
|
|
Report
|
|
|
|