CodeDom and regions

  • Thread starter Thread starter Iain
  • Start date Start date
I

Iain

I'm part way through a project which will create Data Access classes for SQL
Server database more or less automatically from the table definitions in the
DB itself.

I sort of get the CodeDom model (though I expect to HATE having to actually
learn to use it!), but what I can't see is how to define or find #regions in
the code.

You see, I'd like to put my boilerplate code in regions so that if (when)
there is a need to update the code (due to DB changes) then any changes made
by the user will be retained (extra methods and so on).

Any help would be appreciated.

Iain
 
hi Iain
you can easly define #if declarative in your c# code ( i don't see what
exactly is the problem in that )
# If ConstantExpression [ Then ] LineTerminator
[ ConditionalElement+ ]
[ ConditionalElseIfGroup+ ]
[ ConditionalElseGroup ]
# End If LineTerminator
hope that would help

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
You won't find support for regions in the CodeDom because they are not related to the language in any way. They are simply an IDE convenience and are ignored by the compiler.
 
So if I wanted to find them I would have to parse the text in the class?

OK. Thanks.

Iain
Charlie Williams said:
You won't find support for regions in the CodeDom because they are not
related to the language in any way. They are simply an IDE convenience and
are ignored by the compiler.
 
Back
Top