473,396 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CodeDom and regions

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
Nov 16 '05 #1
4 2288
So if I wanted to find them I would have to parse the text in the class?

OK. Thanks.

Iain
"Charlie Williams" <an*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
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.
Nov 16 '05 #2
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

Nov 16 '05 #3
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.
Nov 16 '05 #4
So if I wanted to find them I would have to parse the text in the class?

OK. Thanks.

Iain
"Charlie Williams" <an*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
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.
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ron Bullman | last post by:
Hi, I havent been able to find any documentation about @ in the CodeDom context. The problem is when generating C# code from CodeDom it will associate a @-tag with all C# specific types. Why?...
7
by: Osvaldo Bisignano | last post by:
I want to generate #region #endregion statements through codedom.
2
by: Guillaume | last post by:
I don't think I'm the only one with this challenge so… I made code with the CodeDom classes and made code to create a new solution and a new project Now I want to get the codedom code in the new...
2
by: Iain | last post by:
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...
1
by: John Livermore | last post by:
Hello, We have an application that uses CodeDom for dynamic in-memory compilation of code. The same code (library) is used by both an ASP.net web site and a Windows Service. The code runs fine...
7
by: Ashish | last post by:
I am using the CodeDom namespace for generating classes, and would really like to be able to use the CodeRegionDirective class to generate regions around code blocks. The only problem is that is...
9
by: lee.chappers | last post by:
How can I make the CodeDom generate the following C# method? protected sealed override void Test() { } I've tried using: domMethod.Attributes = MemberAttributes.Override |...
6
by: moondaddy | last post by:
will CodeDom create XAML windows or just regular windows forms? If so, how to I tell it to create a xaml window instead of a windows form? thanks -- moondaddy@noemail.noemail
2
by: CodeMonkey775 | last post by:
I'm having problems passing a variable to a method which is executed and compiled using CodeDom. The situation is I have a List<CellData> with cells, each containing a formula (like Excel). I am...
1
by: =?Utf-8?B?QU1lcmNlcg==?= | last post by:
I may have painted myself into a corner with GenerateInMemory=true. My app need a custom user step. Users want to code (sort of - they are not programmers) some refinements to a search...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.