📄 gui_netcode.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
<TITLE>LLBLGen::GUI: .NET Code tab</TITLE>
<link rel="STYLESHEET" type="text/css" href="general.css">
</HEAD>
<BODY>
<br>
<h3>LLBLGen::GUI: .NET Code tab</h3>
<br>
<p align="center">
<img src="sshot_netcode.gif" border="0">
<p class="SmallFontREF" align="center">
<b>The .NET code tab.</b>
</p>
</p>
<p>
LLBLGen's .NET code generator is very flexible and the layout and featureset of the
generated code is configurable using this tab.
<br><br>
<b class="SmallHdr">The tab's controls and their meaning</b><br>
<ul>
<li><b>Output Language</b>. <br>Specify here in which language LLBLGen should output the .NET classes: VB.NET or C#.
Both options result in code that behaves equally and has the same functionality, so choosing one over the
other is a matter of taste.</li>
<li><b>Namespace</b>. <br>The namespace to use for the generated .NET code. All .NET classes generated by LLBLGen
will be generated as a member of this namespace. </li>
<li><b>.NET Class prefix</b>. <br>The prefix to use for each .NET class name and each .NET class file. In this
documentation '[Class prefix]' is used to illustrate where the .NET Class prefix is used.</li>
<li><b>Include comments</b>. <br>When checked, LLBLGen will include '///' comments to add additional information to
the generated code. The comments are constructed with code documentation generation in mind. This setting
is highly recommended. When you choose 'VB.NET' as Output Language, LLBLGen will still emit C# style comments
when <i>Include comments</i> is checked, but will prefix each line with "' ". Code browsing documentation
generators will now still be able to construct documentation based on the XML tags present but the VB.NET
compiler will not be throwing errors when consuming these lines.</li>
<li><b>Include NULL value support</b>. <br>When checked, LLBLGen will add support for database-NULL values for
fields which can be NULL. These fields will not have a check on NULL in the set-clause of the field
representing property. When left unchecked, LLBLGen will include in each set-clause of all properties
a check for NULL and this code will throw an <b>ArgumentOutOfRangeException</b> when a NULL is passed
as value. It's not recommended to use NULL values in databases, but if you do use them, you should check
this option.</li>
<li><b>Include Connection Provider Object support</b>. <br>When checked, LLBLGen will generate an extra class,
[Class prefix]ConnectionProvider, plus will generate extra code in all generated classes to support this
extra class. This class is used to share an open SqlConnection object among several data-access tier classes
to make it possible to run methodcalls in one single ADO.NET transaction.</li>
<li><b>Include COM+ services support code</b>. <br>Checking this option will make LLBLGen generate COM+ compatible
code which will use System.EnterpriseServices and System.Runtime.InteropServices namespaces to make
the generated classes be able to participate in a COM+ package (application). When checked, LLBLGen will
derive the abstract base class [class prefix]DBInteractionBase from System.EnterpriseServices.ServicedComponent.
Also will the abstract base class include commented out AssemblyInfo code which can be used to name the
COM+ application this code will participate in, plus the .snk key file to use for GAC registration. Only check
this option when the generated data-access tier objects will be used with COM+ services and/or COM+ service
using .NET components. When this checkbox is checked, the complete COM+ group will be enabled, plus the 3rd
connection string option. All Class-scope COM+ attributes are emitted in the abstract base class. This way,
users can change emitted attribute-arguments for all classes in one place.
<ul>
<li><b>Include COM+ transaction support</b>. <br>When the generated .NET classes should be able to participate
in a COM+ transaction, select this option. LLBLGen will generate solely 'Transaction.Supported'
code, since the actions performed by the data-access tier are atomic, so starting a new transaction
at the data-access tier level would be unnecessary and would only lead to more overhead. Checking
this option will enable the 'Use AutoComplete for transactions' option.</li>
<li><b>Use AutoComplete for transactions</b>. <br>Checking this option will make LLBLGen generate code which
will automatically commit or abort the current transaction, using the [AutoComplete] attribute.
If this option is left unchecked, LLBLGen adds voting code to the methods of the .NET classes:
when the methods succeed, the method will set ContextUtil.MyTransactionVote to TransactionVote.Commit,
otherwise to TransactionVote.Abort.</li>
<li><b>Include Just In Time activation support</b>. <br>When this option is checked, LLBLGen will emit
an attribute to switch on Just In Time activation for the generated .NET classes.</li>
<li><b>Include Load Balancing support</b>. <br>When this option is checked, LLBLGen will emit
an attribute to switch on Load Balancing support for COM+ applications. This will only work
on Windows 2000 Advanced Server or higher with Microsoft Application Server 2000 installed, which
installs COM+ Load Balancing.</li>
<li><b>Include Object Pooling support</b>. <br>When this option is checked, LLBLGen will emit
an attribute to switch on Object Pooling support. </li>
</ul>
</li>
<li><b>Code style: Microsoft caMel / PasCal style</b>. <br>When this radiobutton is selected, LLBLGen
will generate all .NET code in the Microsoft recommended caMel / PasCal style. Prefixing of properties
is not enabled. The .NET API is written in this coding style, so when you want to commit your code
to this style, select this option. LLBLGen follows the rules as described in the .NET reference manual,
plus will prefix all membervariables with a '_'. This prefixing is not standard, but is seen quite a lot
in examples, plus prefixing membervariables is a <i>Good Thing</i><sup>TM</sup>, because it will avoid conflicts
when a variable in a methodheader has the same name, at least in case-insensitive languages like VB.NET. </li>
<li><b>Code style: Hungarian</b>. <br>When this radiobutton is selected, LLBLGen will generate all .NET code in
the 'Hungarian' coding style, which means type prefixes added to all the parameter values and membervariables.
All member variables are also prefixed with 'm_'. The checkbox 'Prefix properties' is enabled.</li>
<li><b>Code style: Prefix properties</b>. <br>When this option is checked, LLBLGen will prefix all properties
for all fields with a hungarian coding style prefix. This option is only selectable when Hungarian coding
style is selected.</li>
<li><b>Connection string: Using a definition in an App.config file</b>. <br>When this radiobutton is selected,
LLBLGen will generate an 'App.config' file, like the ones Visual Studio will generate for you, with
one tag for the connection string: 'Main.ConnectionString'. You can change the connection string
whenever you like, by modifying this app.config file. This file should be added to the project which
<i>consumes</i> (thus uses) the data-access classes project. It's of no use to add this App.config file
to the data-access classes project, it will be ignored by the compiler. See also
<a href="generalusage.htm">General usage information</a> about the usage of the Main.ConnectionString tag
in Web.config files, when you're building an ASP.NET application.</li>
<li><b>Connection string: Using a property</b>. <br>When this radiobutton is selected, LLBLGen will generate a
property in the base class, [property prefix]ConnectionString. Calling code should pass the connection
string which should be used to make a connection with the database, to this property after creation of
the object, and before calling any methods. </li>
<li><b>Connection string: Using the Object Construction String</b>. <br>When a COM+ object is registered with
COM+, the administrator can specify a so called 'Construction String'. This string is passed to
the object when it's created by the class factory. When the .NET classes will be used in a COM+ application,
the administrator can choose for the Construction String to specify the connection string. This method
is used in the Fitch & Mather Stocks example project for .NET. </li>
</ul>
</p>
<div align="right" class="SmallFontTOC">
<hr size="1" width="60%" align="right">
LLBLGen v1.2 documentation. © 2002 <a href="http://www.sd.nl/" target="_blank">Solutions Design</a>
</div>
<br><br>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -