Skip to content

Commit ba1b4d8

Browse files
committed
Extracted core project as part of journey to vNext
1 parent 22bd112 commit ba1b4d8

File tree

80 files changed

+2003
-236
lines changed

Some content is hidden

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

80 files changed

+2003
-236
lines changed

.vs/config/applicationhost.config

Lines changed: 1027 additions & 0 deletions
Large diffs are not rendered by default.
File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>$id$</id>
5+
<version>$version$</version>
6+
<title>$title$</title>
7+
<authors>$author$</authors>
8+
<owners>$author$</owners>
9+
<projectUrl>https://github.com/mcintyre321/mvc.jquery.datatables</projectUrl>
10+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11+
<description>$description$</description>
12+
<copyright>Copyright 2011</copyright>
13+
<tags>jquery datatables iqueryable razor</tags>
14+
</metadata>
15+
<!--files>
16+
<file src="RegisterDatatablesModelBinder.cs.pp" target="Content" />
17+
</files-->
18+
</package>
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using Mvc.JQuery.Datatables.Models;
5+
using Mvc.JQuery.Datatables.Reflection;
6+
7+
namespace Mvc.JQuery.Datatables
8+
{
9+
public static class DataTablesColumnsReflectionHelper{
10+
public static ColDef[] ColDefs (this Type t)
11+
{
12+
var propInfos = DataTablesTypeInfo.Properties(t);
13+
var columnList = new List<ColDef>();
14+
15+
foreach (var dtpi in propInfos)
16+
{
17+
18+
var colDef = new ColDef(dtpi.PropertyInfo.Name, dtpi.PropertyInfo.PropertyType);
19+
foreach (var att in dtpi.Attributes)
20+
{
21+
att.ApplyTo(colDef, dtpi.PropertyInfo);
22+
}
23+
24+
columnList.Add(colDef);
25+
}
26+
return columnList.ToArray();
27+
}
28+
public static ColDef[] ColDefs<TResult>()
29+
{
30+
return ColDefs(typeof(TResult));
31+
}
32+
33+
34+
}
35+
}

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

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)