|
From: Jacob E. <jac...@ya...> - 2004-07-20 12:46:36
|
Attached are the CVS patch files for the alterations
I've made to n-orca so far. Most of the canges address
issues I ran into in creating a GUI:
* Corrected a problem with serialization of the
TemplateDef object that caused template outputs to be
duplicated when the object was serialized and then
deserialized.
* Moved serialization/deserialization to overloaded
Load/Save methods which accept a Stream object. The
original methods call the overloaded ones passing a
FileStream, and a new Clone() method (Project now
implements IClonable) creates a copy of the project by
serializing to a MemoryStream.
* Removed call to Substitute() from Project.Load()
when a project is deserialized. This call would
substitute paths when the project was loaded,
overwriting any {placeholder} variables. The
Substitute method was also renamed to SubstitutePaths,
and a SubstituteProjectPlaceHolders method was added
which substitutes all project-level placeholders in a
string. Similar methods were also added to
BusinessObject and GeneratorBase, and {placeholder}
substitutions made throught the project were replaced
with calls to these methods. This centralizes the
substitutions in the objects where they are most
relevant, and makes it easier to add additional
placeholders in the future.
* The GeneratorRunner.Run() method now creates a
cloned copy of the project and calls SubstitutePaths()
before running it. This isolates changes made to the
project as a result of running it (path substitutions
in particular). These changes aren't a problem when
running from the command line, but in the GUI, if you
run the project and then save it, all the path
substitutions will be saved.
* Added *_PROC_PATTERN_NAME constants to Project. This
allows me, for example, to specify the outupt of my
stored proc as "{SQL}\{InsertStoredProcPattern}.sql"
* Added some calls to Trace.Writeline() in order to
give some feedback about the generation process in the
GUI. I think this should probably be replaced (or
augmented) with an observer class, or similar, later
on which would allow the communication of more
detailed information back to the GUI.
Any questions or comments, let me know.
Thanks,
-Jacob Eggleston
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail |