Skip to content

Commit 743b449

Browse files
committed
refactor
1 parent 9db172f commit 743b449

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/TableStorage.Abstractions.TableEntityConverters/EntityConvert.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static DynamicTableEntity ToTableEntity<T>(this T o, string partitionKey,
2929
}
3030
public static DynamicTableEntity ToTableEntity<T>(this T o, string partitionKey, string rowKey,
3131
JsonSerializerSettings jsonSerializerSettings,
32-
PropertyConverters<T> propertyConverters,
32+
PropertyConverters<T> propertyConverters = default,
3333
params Expression<Func<T, object>>[] ignoredProperties)
3434
{
3535
_ = jsonSerializerSettings ?? throw new ArgumentNullException(nameof(jsonSerializerSettings));
@@ -48,7 +48,7 @@ public static DynamicTableEntity ToTableEntity<T>(this T o, Expression<Func<T, o
4848

4949
public static DynamicTableEntity ToTableEntity<T>(this T o, Expression<Func<T, object>> partitionProperty,
5050
Expression<Func<T, object>> rowProperty, JsonSerializerSettings jsonSerializerSettings,
51-
PropertyConverters<T> propertyConverters = null,
51+
PropertyConverters<T> propertyConverters = default,
5252
params Expression<Func<T, object>>[] ignoredProperties)
5353
{
5454
_ = jsonSerializerSettings ?? throw new ArgumentNullException(nameof(jsonSerializerSettings));
@@ -85,7 +85,9 @@ public static T FromTableEntity<T, TP, TR>(this DynamicTableEntity entity,
8585

8686
public static T FromTableEntity<T, TP, TR>(this DynamicTableEntity entity,
8787
Expression<Func<T, object>> partitionProperty,
88-
Expression<Func<T, object>> rowProperty, JsonSerializerSettings jsonSerializerSettings, PropertyConverters<T> propertyConverters = null) where T : new()
88+
Expression<Func<T, object>> rowProperty,
89+
JsonSerializerSettings jsonSerializerSettings,
90+
PropertyConverters<T> propertyConverters = default) where T : new()
8991
{
9092
_ = jsonSerializerSettings ?? throw new ArgumentNullException(nameof(jsonSerializerSettings));
9193

@@ -116,7 +118,8 @@ public static T FromTableEntity<T, TP, TR>(this DynamicTableEntity entity,
116118
public static T FromTableEntity<T, TP, TR>(this DynamicTableEntity entity,
117119
Expression<Func<T, object>> partitionProperty,
118120
Func<string, TP> convertPartitionKey, Expression<Func<T, object>> rowProperty,
119-
Func<string, TR> convertRowKey, JsonSerializerSettings jsonSerializerSettings, PropertyConverters<T> propertyConverters = null) where T : new()
121+
Func<string, TR> convertRowKey, JsonSerializerSettings jsonSerializerSettings,
122+
PropertyConverters<T> propertyConverters = default) where T : new()
120123
{
121124
_ = jsonSerializerSettings ?? throw new ArgumentNullException(nameof(jsonSerializerSettings));
122125

@@ -158,7 +161,8 @@ public static T FromTableEntity<T, TP, TR>(this DynamicTableEntity entity,
158161
return FromTableEntity<T>(entity, _defaultJsonSerializerSettings);
159162
}
160163

161-
public static T FromTableEntity<T>(this DynamicTableEntity entity, JsonSerializerSettings jsonSerializerSettings, PropertyConverters<T> propertyConverters = null) where T : new()
164+
public static T FromTableEntity<T>(this DynamicTableEntity entity,
165+
JsonSerializerSettings jsonSerializerSettings, PropertyConverters<T> propertyConverters = default) where T : new()
162166
{
163167
_ = jsonSerializerSettings ?? throw new ArgumentNullException(nameof(jsonSerializerSettings));
164168

0 commit comments

Comments
 (0)