Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If the code using said configuration items is code you manage/can change (and all running in managed code space/C#) I would look to porting the method calls that get settings to a call into a singleton-like class with at least a GetString() method on it.</p> <p>GetObject() can be very useful (check out the .Net XML serialisation stuff - the Americans spell it with a 'z': serialization) ... useful for lots of stuff but also because it means you can start packaging related configuration items into single entries in the store.</p> <p>As regards using a single store (a database table with cached access) or use your new configuration facade only to encapsulate where the configuration items are stored - that's up to you ... I strongly prefer a single store per product deployment for configuration because then you always know exactly where to look and where to make changes. All the web service references (WCF or otherwise) can be constucted and called using runtime-supplied strings ... :)</p> <p>In terms of caching values for keys - I use my own in memory cache (for smaller apps) because the overhead on the stack is manageable ... things like memcache might work here (config store is accessed over TCP/on the network somewhere) ... </p> <p>EDIT Something like:</p> <pre><code>public class ConfigurationStore { private static ConfigurationStore _instance = null; public static ConfigurationStore Instance { get { if(_instance == null) { _instance = new ConfigurationStore(); } return _instance; } } public string GetValue(string key) { .... } public Object GetObject(string key) { ... } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload