Skip to content

Commit f3ab33d

Browse files
committed
Minor code cleanup
1 parent f80fbe3 commit f3ab33d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/TableStorage.Abstractions.TableEntityConverters/EntityConvert.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ public static DynamicTableEntity ToTableEntity<T>(this T o, Expression<Func<T, o
2626
var partitionProp =
2727
properties.SingleOrDefault(p => p.Name == GetPropertyNameFromExpression(partitionProperty));
2828
if (partitionProp == null)
29+
{
2930
throw new ArgumentException(nameof(partitionProperty));
31+
}
3032

3133
var rowProp = properties.SingleOrDefault(p => p.Name == GetPropertyNameFromExpression(rowProperty));
3234
if (rowProp == null)
35+
{
3336
throw new ArgumentException(nameof(rowProperty));
37+
}
3438

3539
properties.Remove(partitionProp);
3640
properties.Remove(rowProp);
@@ -124,6 +128,7 @@ internal static string GetPropertyNameFromExpression<T>(Expression<Func<T, objec
124128
private static void FillProperties<T>(DynamicTableEntity entity, T o, List<PropertyInfo> properties) where T : new()
125129
{
126130
foreach (var propertyInfo in properties)
131+
{
127132
if (entity.Properties.ContainsKey(propertyInfo.Name))
128133
{
129134
var val = entity.Properties[propertyInfo.Name].PropertyAsObject;
@@ -165,6 +170,7 @@ internal static string GetPropertyNameFromExpression<T>(Expression<Func<T, objec
165170
propertyInfo.SetValue(o, propVal);
166171
}
167172
}
173+
}
168174
}
169175

170176
private static DynamicTableEntity CreateTableEntity(object o, List<PropertyInfo> properties,

0 commit comments

Comments
 (0)