diff options
author | lbsa71 | 2009-02-19 14:54:21 +0000 |
---|---|---|
committer | lbsa71 | 2009-02-19 14:54:21 +0000 |
commit | 549c615e0e7fbc4fa284de533db673e7e2fd665b (patch) | |
tree | eb1b42f9ea8c581219a4f0743ea4e92d253037ee /Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs | |
parent | * Changed all AssemblyInfo to explicit version 1.0.0.0 to not confuse poor po... (diff) | |
download | opensim-SC-549c615e0e7fbc4fa284de533db673e7e2fd665b.zip opensim-SC-549c615e0e7fbc4fa284de533db673e7e2fd665b.tar.gz opensim-SC-549c615e0e7fbc4fa284de533db673e7e2fd665b.tar.bz2 opensim-SC-549c615e0e7fbc4fa284de533db673e7e2fd665b.tar.xz |
* reverted the revert of the revert. What can I say? I'm calling this a day, and will get back up on the horse tomorrow.
Diffstat (limited to 'Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs')
-rw-r--r-- | Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs b/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs deleted file mode 100644 index 97c3964..0000000 --- a/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | using System; | ||
2 | using Prebuild.Core.Attributes; | ||
3 | using Prebuild.Core.Utilities; | ||
4 | |||
5 | namespace Prebuild.Core.Nodes | ||
6 | { | ||
7 | [DataNode("DatabaseReference")] | ||
8 | public class DatabaseReferenceNode : DataNode | ||
9 | { | ||
10 | string name; | ||
11 | Guid providerId; | ||
12 | string connectionString; | ||
13 | |||
14 | public string Name | ||
15 | { | ||
16 | get { return name; } | ||
17 | } | ||
18 | |||
19 | public Guid ProviderId | ||
20 | { | ||
21 | get { return providerId; } | ||
22 | } | ||
23 | |||
24 | public string ConnectionString | ||
25 | { | ||
26 | get { return connectionString; } | ||
27 | } | ||
28 | |||
29 | public override void Parse(System.Xml.XmlNode node) | ||
30 | { | ||
31 | name = Helper.AttributeValue(node, "name", name); | ||
32 | |||
33 | string providerName = Helper.AttributeValue(node, "providerName", string.Empty); | ||
34 | if (providerName != null) | ||
35 | { | ||
36 | switch (providerName) | ||
37 | { | ||
38 | // digitaljeebus: pulled from HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\DataProviders\* | ||
39 | // Not sure if these will help other operating systems, or if there's a better way. | ||
40 | case "Microsoft.SqlServerCe.Client.3.5": | ||
41 | providerId = new Guid("7C602B5B-ACCB-4acd-9DC0-CA66388C1533"); break; | ||
42 | case "System.Data.OleDb": | ||
43 | providerId = new Guid("7F041D59-D76A-44ed-9AA2-FBF6B0548B80"); break; | ||
44 | case "System.Data.OracleClient": | ||
45 | providerId = new Guid("8F5C5018-AE09-42cf-B2CC-2CCCC7CFC2BB"); break; | ||
46 | case "System.Data.SqlClient": | ||
47 | providerId = new Guid("91510608-8809-4020-8897-FBA057E22D54"); break; | ||
48 | case "System.Data.Odbc": | ||
49 | providerId = new Guid("C3D4F4CE-2C48-4381-B4D6-34FA50C51C86"); break; | ||
50 | |||
51 | default: | ||
52 | throw new ArgumentOutOfRangeException("providerName", providerName, "Could not provider name to an id."); | ||
53 | } | ||
54 | } | ||
55 | else | ||
56 | providerId = new Guid(Helper.AttributeValue(node, "providerId", Guid.Empty.ToString("B"))); | ||
57 | |||
58 | connectionString = Helper.AttributeValue(node, "connectionString", connectionString); | ||
59 | |||
60 | base.Parse(node); | ||
61 | } | ||
62 | } | ||
63 | } | ||