Skip to content

Commit 31cefc3

Browse files
committed
Refactor
1 parent cc280ec commit 31cefc3

File tree

8 files changed

+11
-72
lines changed

8 files changed

+11
-72
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dime.Ext
22

3-
[![Build Status](https://dev.azure.com/dimenicsbe/Utilities/_apis/build/status/Ext%20-%20MAIN%20-%20CI?branchName=master)](https://dev.azure.com/dimenicsbe/Utilities/_build/latest?definitionId=66&branchName=master)
3+
[![Build Status](https://dev.azure.com/dimenicsbe/Utilities/_apis/build/status/Ext%20-%20MAIN%20-%20CI?branchName=master)](https://dev.azure.com/dimenicsbe/Utilities/_build/latest?definitionId=66&branchName=master) [![Dime.ExtJs package in Dime.Scheduler feed in Azure Artifacts](https://feeds.dev.azure.com/dimenicsbe/_apis/public/Packaging/Feeds/a7b896fd-9cd8-4291-afe1-f223483d87f0/Packages/07e6d457-5eb4-4a37-888b-e01c31169065/Badge)](https://dev.azure.com/dimenicsbe/Utilities/_packaging?_a=package&feed=a7b896fd-9cd8-4291-afe1-f223483d87f0&package=07e6d457-5eb4-4a37-888b-e01c31169065&preferRelease=true)
44

55
## Introduction
66

@@ -46,4 +46,4 @@ Please make sure to update tests as appropriate.
4646

4747
## License
4848

49-
MIT
49+
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

src/core/Action.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@
55
/// </summary>
66
public abstract class Action
77
{
8-
#region Constructor
9-
108
/// <summary>
119
/// Initializes a new instance of the <see cref="Action"/> class
1210
/// </summary>
13-
public Action()
11+
protected Action()
1412
{
1513
}
1614

17-
#endregion Constructor
18-
19-
#region Properties
20-
2115
/// <summary>
2216
/// Gets or sets the property on which the action to invoke
2317
/// </summary>
@@ -43,7 +37,5 @@ public Action()
4337
/// Gets or sets the name of the complex type
4438
/// </summary>
4539
public string ComplexTypeName { get; set; }
46-
47-
#endregion Properties
4840
}
4941
}

src/core/AdvancedFilter.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,13 @@
55
/// </summary>
66
public class AdvancedFilter : Filter
77
{
8-
#region Constructor
9-
108
/// <summary>
119
/// Initializes a new instance of the <see cref="AdvancedFilter"/> class
1210
/// </summary>
1311
public AdvancedFilter() : base()
1412
{
1513
}
1614

17-
#endregion Constructor
18-
19-
#region Properties
20-
2115
/// <summary>
2216
/// Gets or sets the group key to which this filter belongs
2317
/// </summary>
@@ -32,7 +26,5 @@ public AdvancedFilter() : base()
3226
/// Gets or sets the flag to indicate whether the filter is 'AND' or 'OR'
3327
/// </summary>
3428
public override bool And => Condition != "OR";
35-
36-
#endregion Properties
3729
}
3830
}

src/core/Dime.ExtJs.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@
1717
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1818
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
1919
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
20-
<Version>1.1.1</Version>
20+
<Version>1.1.2</Version>
2121
<Description>.NET classes for ExtJS operations such as grouping, sorting and filtering</Description>
2222
<Copyright>Copyright © 2020</Copyright>
2323
<NeutralLanguage>en</NeutralLanguage>
2424
<IncludeSource>True</IncludeSource>
2525
<IncludeSymbols>True</IncludeSymbols>
2626
<RootNamespace>Dime.ExtJs</RootNamespace>
27-
<AssemblyVersion>1.1.1.0</AssemblyVersion>
27+
<AssemblyVersion>1.1.2.0</AssemblyVersion>
2828
<PackageLicenseExpression>MIT</PackageLicenseExpression>
29+
<RepositoryType>git</RepositoryType>
2930
</PropertyGroup>
3031

3132
<ItemGroup>
32-
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
33-
<PackageReference Include="System.Runtime" Version="4.3.0" />
33+
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
34+
<PackageReference Include="System.Runtime" Version="4.3.1" />
3435
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
3536
</ItemGroup>
3637

src/core/Filter.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ namespace Dime.ExtJs
1010
[DebuggerDisplay("{Property} - {Value}")]
1111
public class Filter : IFilter
1212
{
13-
#region Constructor
14-
1513
/// <summary>
1614
/// Initializes a new instance of the <see cref="Filter"/> class
1715
/// </summary>
@@ -20,10 +18,6 @@ public Filter()
2018
And = true;
2119
}
2220

23-
#endregion Constructor
24-
25-
#region Properties
26-
2721
/// <summary>
2822
/// Gets or sets the property name
2923
/// </summary>
@@ -44,10 +38,6 @@ public Filter()
4438
/// </summary>
4539
public virtual bool And { get; set; }
4640

47-
#endregion Properties
48-
49-
#region Methods
50-
5141
/// <summary>
5242
/// Checks whether the filter needs to be done on an associated model
5343
/// </summary>
@@ -58,9 +48,6 @@ public Filter()
5848
///
5949
/// </summary>
6050
/// <returns></returns>
61-
/// <history>
62-
/// [HB] 03/11/2016 - Refactor into filter class
63-
/// </history>
6451
public IDictionary<int, string> GetFields()
6552
{
6653
int c = 1;
@@ -73,7 +60,5 @@ public IDictionary<int, string> GetFields()
7360

7461
return properties;
7562
}
76-
77-
#endregion Methods
7863
}
7964
}

src/core/Group.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,23 @@ namespace Dime.ExtJs
77
/// </summary>
88
public class Group : Action
99
{
10-
#region Constructor
11-
1210
/// <summary>
1311
/// Initializes a new instance of the <see cref="Group"/> class
1412
/// </summary>
1513
public Group() : base()
1614
{
1715
}
1816

19-
#endregion Constructor
20-
21-
#region Properties
22-
2317
/// <summary>
24-
/// Gets or sets the flag whether this is a comple grouper
18+
/// Gets or sets the flag whether this is a complex grouper
2519
/// </summary>
2620
public bool ComplexType { get; set; }
2721

28-
#endregion Properties
29-
30-
#region Methods
31-
3222
/// <summary>
3323
/// Casts a string to the group
3424
/// </summary>
3525
/// <param name="groupedString">The group string as passed in by the Ext framework</param>
3626
public static explicit operator Group(string groupedString)
3727
=> string.IsNullOrEmpty(groupedString) ? null : JsonConvert.DeserializeObject<Group>(groupedString);
38-
39-
#endregion Methods
4028
}
4129
}

src/core/Order.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@
66
/// <typeparam name="T"></typeparam>
77
public class Order<T>
88
{
9-
#region Constructor
10-
119
/// <summary>
1210
/// Initializes a new instance of the <see cref="Order"/> class
1311
/// </summary>
1412
public Order()
1513
{
1614
}
1715

18-
#endregion Constructor
19-
20-
#region Properties
21-
2216
/// <summary>
2317
/// Gets or sets the property on which to sort on
2418
/// </summary>
@@ -28,7 +22,5 @@ public Order()
2822
/// Gets or sets the flag if the sort operation is ascending
2923
/// </summary>
3024
public bool IsAscending { get; set; }
31-
32-
#endregion Properties
3325
}
3426
}

src/core/Sort.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,18 @@ namespace Dime.ExtJs
77
/// </summary>
88
public class Sort : Action
99
{
10-
#region Constructor
11-
1210
/// <summary>
1311
/// Initializes a new instance of the <see cref="Sort"/> class
1412
/// </summary>
1513
public Sort() : base()
1614
{
1715
}
1816

19-
#endregion Constructor
20-
21-
#region Methods
22-
2317
/// <summary>
2418
/// Casts a string to the sorter
2519
/// </summary>
2620
/// <param name="orderString">The order string as passed in by the Ext framework</param>
27-
public static explicit operator Sort(string orderString)
28-
{
29-
Sort order = string.IsNullOrEmpty(orderString) ? null : JsonConvert.DeserializeObject<Sort>(orderString);
30-
return order;
31-
}
32-
33-
#endregion Methods
21+
public static explicit operator Sort(string orderString)
22+
=> string.IsNullOrEmpty(orderString) ? null : JsonConvert.DeserializeObject<Sort>(orderString);
3423
}
3524
}

0 commit comments

Comments
 (0)