1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
<html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>IConfigSource.ExpandKeyValues Method</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner">
<div id="bannerrow1">
<table class="bannerparthead" cellspacing="0">
<tr id="hdr">
<td class="runninghead">Nini Library API Reference - http://nini.sourceforge.net/</td>
<td class="product">
</td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">IConfigSource.ExpandKeyValuesMethod</h1>
</div>
</div>
<div id="nstext">
<p> Expands all key values. </p>
<div class="syntax">
<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemVoidClassTopic.htm">void</a>ExpandKeyValues();</div>
<h4 class="dtH4">Remarks</h4>
<p> Calling this method expands all key values with the values of other keys. See the example below for more information. </p>
<h4 class="dtH4">Example</h4>
<p> In many cases you will find that your key values are dependent on the values of other keys. For instance you have a root path configuration value and several values for files that use this path like in this example: <pre class="code">[File Path]
RootPath = C:\Program Files\My Program
Logging = MyApp.log
WebPage = index.html
</pre> Without Nini if you wanted to combine the value of "RootPath" with "Logging" and "WebPage" then you would have to perform ugly string concatenations to get "C:\Program Files\My Program\index.html". In Nini you do not need to do this: <pre class="code">[File Path]
RootPath = C:\Program Files\My Program
Logging = ${RootPath}\MyApp.log
WebPage = ${RootPath}\index.html
</pre> This can save you a lot of trouble concatenating them yourself and make your code a lot cleaner. If you want to grab a value from a different section you can do the same above but add the section name followed by a bar ("|") like so: ${section|key}. </p>
<h4 class="dtH4">See Also</h4>
<p>
<a href="Nini.Config.IConfigSource.html">IConfigSource Interface</a> | <a href="Nini.Config.html">Nini.Config Namespace</a></p>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
<param name="Keyword" value="ExpandKeyValues method">
</param>
<param name="Keyword" value="ExpandKeyValues method, IConfigSource interface">
</param>
<param name="Keyword" value="IConfigSource.ExpandKeyValues method">
</param>
</object>
<hr />
<div id="footer">
<p>
<a>Copyright (c) 2006 Brent R. Matzelle</a>
</p>
<p>
</p>
</div>
</div>
</body>
</html>
|