Isline Framework series six--dataprovider data access (next)

Source: Internet
Author: User
Tags bool

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.