Posted 17 years ago by Ilya
Version: 4.0.0233
Avatar
Hi. I need to save object of DotNetProjectResolver. I tried to serialize it, but caught exception, because DotNetProjectResolver class isn't a serializable object. Please tell me, how can I save this object and load information after several days? Will you make this class serializable in the next releases?

Comments (6)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
What information exactly are you trying to serialize from that class? For instance, the assembly data used for reflection is stored in cache files already.


Actipro Software Support

Posted 17 years ago by Ilya
Avatar
OK. But how can I load this data to my DotNetProjectResolver object after closing of the my application?
And I decide to store all reflection data from my source code which was edited in SyntaxEditor. Can I do this?
May be you will make your classes as Serializable.

[Modified at 11/11/2006 12:57 AM]
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
To reload externally referenced assemblies you simply add those references back in using methods like AddExternalReference and AddExternalReferenceForSystemAssembly. All the reflection information for those assemblies is stored in the Cache folder that you should have configured via the CachePath before loading any assemblies. Loading cached data is very fast.

For source code in a "project" (that your application edits) that you are working on, you should queue up your source files in the project again as a series of low priority requests to the semantic parser service. This is accomplished easily by calling this sort of line for each source code file:
dotNetProjectResolver.SourceProjectContent.LoadForFile(language, filepath);


Actipro Software Support

Posted 17 years ago by Ilya
Avatar
Thank you for help. Now I'm using cache files and loading files with code when I'm opening my "project". But there are more then 150 files in my project and the first start is too long. Now I want to optimize my code using serialization of DotNetProjectResolver. But I can't to do this. In my project I have to load all files. Could you tell me how I should optimize my application using standart features of the SyntaxEditor?
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I see, it's the source project content that is taking a while for you. I'll add a TODO item to enable saving/loading of the DotNetProjectResolver.SourceProjectContent to/from a cache file. That would accomplish what you need, correct?


Actipro Software Support

Posted 17 years ago by Ilya
Avatar
Yes, thanks a lot!
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.