Take the above
Actions on the file system:
For the file currently built-in 3 support objects: XML, TEXT, config file, located in class library Xmlprovider, Textprovider, Suitconfigprovider, you can call themselves, file operations mostly using static operation.
Operation on config file:
Here also to introduce a Suitconfigprovider class library in the GetItem, GetSection, Appenditem, Removeelement methods, these methods can quickly get the item in the We.config, node content, As well as adding and removing nodes, for example, there is an item information as follows:
<add key= "Nameabc" value= "Data source=server IP; User; Password=111111;integrated Security=no; Enlist=false; pooling=true; "/>
The item content is immediately available using the Suitconfigprovider.getitem ("NAMEABC") statement
The method in the Suitconfigprovider class is implemented as static and can be called directly by the user, and the following table lists the method invocation instructions:
method name |
description |
Indicates the config type, which defaults to the Web application |
static string GetItem (string key) |
|
Get data for a node, return hashtable |
static string GetConnectionString (Strin G key) |
static bool Modifyitem (string key, String value) |
|
static bool Appenditem (string key, String value) |
|
remove ' Add key ' Item |
To manipulate text files:
Method name |
Description |
static string GetContent (String Fileinfo) |
2 times reload, get file contents |
static bool CreateFile (string FileInfo) |
Create a file |
static bool AppendFile (String str, string FileInfo) |
2 times overload, append file contents |
To manipulate an XML file:
Method name |
Description |
Static list |
2 times overload, get file contents. The incoming file is the file path and root node name, and each node information is stored in the Hashtable and returned in list |
static bool CreateFile (string Singlenode, String FileInfo) |
Creates a file in which the file path and root node name are passed in. |
static bool AppendFile (string Singlenode, String Element, list |
2 times overload, append file contents, incoming file as root node name, append node name, append content structure and append file information. where the appended content structure is list |
Web.config support information for Dataprovider (select configuration):
|
|
Reflection database Factory DLL Location |
isline.security.configuration.tokenkey |
|
database connection Information |
isline.data.configuration.textproviderfileinfo |
Default file location |
sql database connection Information |
isline.data.configuration.oracleconnectstring |