Skip to content

Commit d590c35

Browse files
committed
Use VS2017 project structure
1 parent f0ea07b commit d590c35

File tree

55 files changed

+75
-650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+75
-650
lines changed

Mvc.JQuery.DataTables.Common/Class1.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

Mvc.JQuery.Datatables.Core/ColumnFilterSettingsVm.cs renamed to Mvc.JQuery.DataTables.Common/ColumnFilterSettingsVm.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections;
22
using System.Linq;
3-
using System.Web.Script.Serialization;
3+
using Newtonsoft.Json;
44
using Newtonsoft.Json.Linq;
55

66
namespace Mvc.JQuery.DataTables
@@ -25,7 +25,7 @@ public override string ToString()
2525
this["aoColumns"] = _vm.Columns
2626
//.Where(c => c.Visible || c.Filter["sSelector"] != null)
2727
.Select(c => c.Searchable && c.Filter != null ? c.Filter : noColumnFilter).ToArray();
28-
return new JavaScriptSerializer().Serialize(this);
28+
return JsonConvert.SerializeObject(this);
2929
}
3030
}
3131
}

Mvc.JQuery.Datatables.Core/DataTableConfigVm.cs renamed to Mvc.JQuery.DataTables.Common/DataTableConfigVm.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using System.Net.Mime;
5-
using System.Web.Routing;
6-
using System.Web.Script.Serialization;
74
using Mvc.JQuery.DataTables.Models;
85
using Mvc.JQuery.DataTables.Serialization;
96
using Newtonsoft.Json;
@@ -324,15 +321,19 @@ private static string ConvertColumnSortingToJson(IEnumerable<ColDef> columns)
324321
var sortList = columns.Select((c, idx) => c.SortDirection == SortDirection.None ? new dynamic[] { -1, "" } : (c.SortDirection == SortDirection.Ascending ? new dynamic[] { idx, "asc" } : new dynamic[] { idx, "desc" })).Where(x => x[0] > -1).ToArray();
325322

326323
if (sortList.Length > 0)
327-
return new JavaScriptSerializer().Serialize(sortList);
324+
return JsonConvert.SerializeObject(sortList);
328325

329326
return "[]";
330327
}
331328

332329
private static IDictionary<string, object> ConvertObjectToDictionary(object obj)
333330
{
334-
// Doing this way because RouteValueDictionary converts to Json in wrong format
335-
return new Dictionary<string, object>(new RouteValueDictionary(obj));
331+
var d = new Dictionary<string, object>();
332+
foreach (var propertyInfo in obj.GetType().GetProperties())
333+
{
334+
d[propertyInfo.Name] = propertyInfo.GetValue(obj);
335+
}
336+
return d;
336337
}
337338

338339
private static IEnumerable<JObject> ConvertColumnDefsToTargetedProperty<TProperty>(
File renamed without changes.

Mvc.JQuery.Datatables.Core/DataTablesAttributeBase.cs renamed to Mvc.JQuery.DataTables.Common/DataTablesAttributeBase.cs

File renamed without changes.

Mvc.JQuery.Datatables.Core/DataTablesColumnsReflectionHelper.cs renamed to Mvc.JQuery.DataTables.Common/DataTablesColumnsReflectionHelper.cs

File renamed without changes.

Mvc.JQuery.Datatables.Core/DataTablesExcludeAttribute.cs renamed to Mvc.JQuery.DataTables.Common/DataTablesExcludeAttribute.cs

File renamed without changes.

Mvc.JQuery.Datatables.Core/DataTablesFilterAttribute.cs renamed to Mvc.JQuery.DataTables.Common/DataTablesFilterAttribute.cs

File renamed without changes.

Mvc.JQuery.Datatables.Core/DataTablesFiltering.cs renamed to Mvc.JQuery.DataTables.Common/DataTablesFiltering.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using Mvc.JQuery.DataTables.DynamicLinq;
54
using Mvc.JQuery.DataTables.Reflection;
6-
5+
using System.Linq.Dynamic.Core;
76
namespace Mvc.JQuery.DataTables
87
{
98
internal class DataTablesFiltering
File renamed without changes.

0 commit comments

Comments
 (0)