Diff of /System.Data.SQLite/SQLiteFactory.cs [51a8cf] .. [d2857c]  Maximize  Restore

Switch to unified view

a/System.Data.SQLite/SQLiteFactory.cs b/System.Data.SQLite/SQLiteFactory.cs
1
/********************************************************
1
/********************************************************
2
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
2
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
3
 * Written by Robert Simpson (robert@blackcastlesoft.com)
3
 * Written by Robert Simpson (robert@blackcastlesoft.com)
4
 * 
4
 * 
5
 * Released to the public domain, use at your own risk!
5
 * Released to the public domain, use at your own risk!
6
 ********************************************************/
6
 ********************************************************/

7
7
8
using System.Data.Common;
9
8
namespace System.Data.SQLite
10
namespace System.Data.SQLite

9
{
11
{

10
  using System;
11
  using System.Data.Common;
12
13
#if !PLATFORM_COMPACTFRAMEWORK
12
#if !PLATFORM_COMPACTFRAMEWORK

14
  /// <summary>
13
    /// <summary>

15
  /// SQLite implementation of DbProviderFactory.
14
    /// SQLite implementation of DbProviderFactory.

16
  /// </summary>
15
    /// </summary>

17
  public sealed partial class SQLiteFactory : DbProviderFactory
16
    public sealed partial class SQLiteFactory : DbProviderFactory

18
  {
17
    {
19
    /// <summary>
18
        /// <summary>

20
    /// Static instance member which returns an instanced SQLiteFactory class.
19
        /// Static instance member which returns an instanced SQLiteFactory class.

21
    /// </summary>
20
        /// </summary>

22
    public static readonly SQLiteFactory Instance = new SQLiteFactory();
21
        public static readonly SQLiteFactory Instance = new SQLiteFactory();

23
22
24
    /// <summary>
23
        /// <summary>

25
    /// Returns a new SQLiteCommand object.
24
        /// Returns a new SQLiteCommand object.

26
    /// </summary>
25
        /// </summary>

27
    /// <returns>A SQLiteCommand object.</returns>
26
        /// <returns>A SQLiteCommand object.</returns>

28
    public override DbCommand CreateCommand()
27
        public override DbCommand CreateCommand()

29
    {
28
        {
30
      return new SQLiteCommand();
29
            return new SQLiteCommand();

31
    }
30
        }
32
31
33
    /// <summary>
32
        /// <summary>

34
    /// Returns a new SQLiteCommandBuilder object.
33
        /// Returns a new SQLiteCommandBuilder object.

35
    /// </summary>
34
        /// </summary>

36
    /// <returns>A SQLiteCommandBuilder object.</returns>
35
        /// <returns>A SQLiteCommandBuilder object.</returns>

37
    public override DbCommandBuilder CreateCommandBuilder()
36
        public override DbCommandBuilder CreateCommandBuilder()

38
    {
37
        {
39
      return new SQLiteCommandBuilder();
38
            return new SQLiteCommandBuilder();

40
    }
39
        }
41
40
42
    /// <summary>
41
        /// <summary>

43
    /// Creates a new SQLiteConnection.
42
        /// Creates a new SQLiteConnection.

44
    /// </summary>
43
        /// </summary>

45
    /// <returns>A SQLiteConnection object.</returns>
44
        /// <returns>A SQLiteConnection object.</returns>

46
    public override DbConnection CreateConnection()
45
        public override DbConnection CreateConnection()

47
    {
46
        {
48
      return new SQLiteConnection();
47
            return new SQLiteConnection();

49
    }
48
        }
50
49
51
    /// <summary>
50
        /// <summary>

52
    /// Creates a new SQLiteConnectionStringBuilder.
51
        /// Creates a new SQLiteConnectionStringBuilder.

53
    /// </summary>
52
        /// </summary>

54
    /// <returns>A SQLiteConnectionStringBuilder object.</returns>
53
        /// <returns>A SQLiteConnectionStringBuilder object.</returns>

55
    public override DbConnectionStringBuilder CreateConnectionStringBuilder()
54
        public override DbConnectionStringBuilder CreateConnectionStringBuilder()

56
    {
55
        {
57
      return new SQLiteConnectionStringBuilder();
56
            return new SQLiteConnectionStringBuilder();

58
    }
57
        }
59
58
60
    /// <summary>
59
        /// <summary>

61
    /// Creates a new SQLiteDataAdapter.
60
        /// Creates a new SQLiteDataAdapter.

62
    /// </summary>
61
        /// </summary>

63
    /// <returns>A SQLiteDataAdapter object.</returns>
62
        /// <returns>A SQLiteDataAdapter object.</returns>

64
    public override DbDataAdapter CreateDataAdapter()
63
        public override DbDataAdapter CreateDataAdapter()

65
    {
64
        {
66
      return new SQLiteDataAdapter();
65
            return new SQLiteDataAdapter();

67
    }
66
        }
68
67
69
    /// <summary>
68
        /// <summary>

70
    /// Creates a new SQLiteParameter.
69
        /// Creates a new SQLiteParameter.

71
    /// </summary>
70
        /// </summary>

72
    /// <returns>A SQLiteParameter object.</returns>
71
        /// <returns>A SQLiteParameter object.</returns>

73
    public override DbParameter CreateParameter()
72
        public override DbParameter CreateParameter()

74
    {
73
        {
75
      return new SQLiteParameter();
74
            return new SQLiteParameter();

75
        }
76
    }
76
    }

77
  }
78
#endif
77
#endif

79
}
78
}