2002-10-31 Tim Coleman (tim@timcoleman.com)
[mono.git] / mcs / class / Mono.Data.TdsClient / Mono.Data.TdsClient / TdsParameter.cs
1 //
2 // Mono.Data.TdsClient.TdsParameter.cs
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
9
10 using System;
11 using System.ComponentModel;
12 using System.Data;
13 using System.Data.Common;
14 using System.Runtime.InteropServices;
15
16 namespace Mono.Data.TdsClient {
17         public sealed class TdsParameter : IDbDataParameter, IDataParameter
18         {
19                 #region Fields
20
21                 DbType dbType;
22                 ParameterDirection direction;
23                 bool isNullable;
24                 int offset;
25                 string parameterName;
26                 object objectValue;
27                 string sourceColumn;
28                 DataRowVersion sourceVersion;
29                 byte precision;
30                 byte scale;
31                 int size;
32
33                 #endregion // Fields
34
35                 #region Constructors
36
37                 public TdsParameter ()
38                 {
39                 }
40
41                 public TdsParameter (string parameterName, object value)
42                 {
43                         this.parameterName = parameterName;
44                         this.objectValue = value;
45                 }
46
47                 #endregion // Constructors
48
49                 #region Properties
50
51                 public DbType DbType {
52                         get { return dbType; }
53                         set { dbType = value; }
54                 }
55
56                 public ParameterDirection Direction {
57                         get { return direction; }
58                         set { direction = value; }
59                 }
60
61                 public bool IsNullable {
62                         get { return isNullable; }
63                 }
64
65                 public int Offset {
66                         get { return offset; }
67                         set { offset = value; }
68                 }
69
70                 public string ParameterName {
71                         get { return parameterName; }
72                         set { parameterName = value; }
73                 }
74
75                 public byte Precision {
76                         get { return precision; }
77                         set { precision = value; }
78                 }
79
80                 public byte Scale {
81                         get { return scale; }
82                         set { scale = value; }
83                 }
84
85                 public int Size {
86                         get { return size; }
87                         set { size = value; }
88                 }
89
90                 public string SourceColumn {
91                         get { return sourceColumn; }
92                         set { sourceColumn = value; }
93                 }
94
95                 public DataRowVersion SourceVersion {
96                         get { return sourceVersion; }
97                         set { sourceVersion = value; }
98                 }
99
100                 public object Value {
101                         get { return objectValue; }
102                         set { objectValue = value; }
103                 }
104
105                 #endregion // Properties
106         }
107 }
108