Click here to Skip to main content
15,886,578 members
Articles / Programming Languages / XML

Adaptive Console Framework - Build Your Console Application on the Fly

Rate me:
Please Sign up or sign in to vote.
3.00/5 (1 vote)
18 Sep 2008CDDL9 min read 31K   286   15  
Introduces the goal and use of the Adaptive Console Framework.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Free Type</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

</head>

<BODY>
<P><FONT face=Verdana size=2>In the Free contract, all the command line 
arguments will be considered as the parameter. For example, for patternized 
contract "<FONT face=Courier color=#800000>catool /method:add 20 40</FONT>", if 
the contract type is specified to Free, then the option <FONT face=Courier 
color=#800000>"/method</FONT>" is also considered as a parameter, which means, 
it is no longer an option here.</FONT></P>
<P><FONT face=Verdana size=2>Use the Free contract when there is no need to use 
any option in the command line syntax. Consider we are going to develop a simple 
console application which takes the two given number as input, and then 
calculate and output the added value of the two. In this case, both the two 
numbers are parameters, it is pretty simple and no need to use option here, 
like:</FONT></P>
<P><FONT face=Verdana size=2>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 
cellPadding=2 width="95%" border=1>
  <TBODY>
  <TR>
    <TD>
      <P><FONT face=Courier color=#800000 size=2>D:\&gt;simple_app 20 
      30</FONT></P>
      <P><FONT face=Courier color=#800000 
size=2>50</FONT></P></TD></TR></TBODY></TABLE></FONT></P>
<P><FONT face=Verdana><FONT size=2><STRONG><FONT 
style="BACKGROUND-COLOR: #ffff00">Note</FONT></STRONG>: If a Free contract is 
defined, we cannot define any Exact or Patternized contract in the repository, 
because all the command line arguments are the parameters. Otherwise, an <FONT 
face=Courier color=#800000>InvalidContractException</FONT> would be 
raised.</FONT></FONT></P></BODY>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Architect Prosource Development
China China
I have more than 13 years' experience in software development and more than 5 years' working experience in software industry. I'm the National Certified System Analyst and now I'm the consultant of China System Analyst Institution. I also got the MCP/MCAD certificate on .NET technology in the year 2004.
I'm very interested in system architect and analysis, and also interested in .NET technologies. For my blog please refer to http://www.sunnychen.org.

Comments and Discussions