Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit e8abef7

Browse files
committed
Convert to C# 5.0 properties
1 parent 59f2dc1 commit e8abef7

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

src/ServiceStack.OrmLite/Dapper/CommandDefinition.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@ internal void OnCompleted()
3636
/// <summary>
3737
/// The command (sql or a stored-procedure name) to execute
3838
/// </summary>
39-
public string CommandText { get; }
39+
public string CommandText { get; set; }
4040

4141
/// <summary>
4242
/// The parameters associated with the command
4343
/// </summary>
44-
public object Parameters { get; }
44+
public object Parameters { get; set; }
4545

4646
/// <summary>
4747
/// The active transaction for the command
4848
/// </summary>
49-
public IDbTransaction Transaction { get; }
49+
public IDbTransaction Transaction { get; set; }
5050

5151
/// <summary>
5252
/// The effective timeout for the command
5353
/// </summary>
54-
public int? CommandTimeout { get; }
54+
public int? CommandTimeout { get; set; }
5555

5656
/// <summary>
5757
/// The type of command that the command-text represents
5858
/// </summary>
59-
public CommandType? CommandType { get; }
59+
public CommandType? CommandType { get; set; }
6060

6161
/// <summary>
6262
/// Should data be buffered before returning?
@@ -77,7 +77,7 @@ internal bool AddToCache
7777
/// <summary>
7878
/// Additional state flags against this command
7979
/// </summary>
80-
public CommandFlags Flags { get; }
80+
public CommandFlags Flags { get; set; }
8181

8282
/// <summary>
8383
/// Can async queries be pipelined?

src/ServiceStack.OrmLite/Dapper/DefaultTypeMap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,6 @@ public SqlMapper.IMemberMap GetMember(string columnName)
199199
/// <summary>
200200
/// The settable properties for this typemap
201201
/// </summary>
202-
public List<PropertyInfo> Properties { get; }
202+
public List<PropertyInfo> Properties { get; set; }
203203
}
204204
}

src/ServiceStack.OrmLite/Dapper/FeatureSupport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ private FeatureSupport(bool arrays)
2929
/// <summary>
3030
/// True if the db supports array columns e.g. Postgresql
3131
/// </summary>
32-
public bool Arrays { get; }
32+
public bool Arrays { get; set; }
3333
}
3434
}

src/ServiceStack.OrmLite/Dapper/SimpleMemberMap.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public SimpleMemberMap(string columnName, ParameterInfo parameter)
6363
/// <summary>
6464
/// DataReader column name
6565
/// </summary>
66-
public string ColumnName { get; }
66+
public string ColumnName { get; set; }
6767

6868
/// <summary>
6969
/// Target member type
@@ -76,16 +76,16 @@ public Type MemberType
7676
/// <summary>
7777
/// Target property
7878
/// </summary>
79-
public PropertyInfo Property { get; }
79+
public PropertyInfo Property { get; set; }
8080

8181
/// <summary>
8282
/// Target field
8383
/// </summary>
84-
public FieldInfo Field { get; }
84+
public FieldInfo Field { get; set; }
8585

8686
/// <summary>
8787
/// Target constructor parameter
8888
/// </summary>
89-
public ParameterInfo Parameter { get; }
89+
public ParameterInfo Parameter { get; set; }
9090
}
9191
}

src/ServiceStack.OrmLite/Dapper/SqlMapper.Link.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ private Link(TKey key, TValue value, Link<TKey, TValue> tail)
5050
Value = value;
5151
Tail = tail;
5252
}
53-
public TKey Key { get; }
54-
public TValue Value { get; }
55-
public Link<TKey, TValue> Tail { get; }
53+
public TKey Key { get; set; }
54+
public TValue Value { get; set; }
55+
public Link<TKey, TValue> Tail { get; set; }
5656
}
5757
}
5858
}

src/ServiceStack.OrmLite/Dapper/SqlMapper.LiteralToken.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ internal struct LiteralToken
1313
/// <summary>
1414
/// The text in the original command that should be replaced
1515
/// </summary>
16-
public string Token { get; }
16+
public string Token { get; set; }
1717

1818
/// <summary>
1919
/// The name of the member referred to by the token
2020
/// </summary>
21-
public string Member { get; }
21+
public string Member { get; set; }
2222

2323
internal LiteralToken(string token, string member)
2424
{

0 commit comments

Comments
 (0)