Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversão para .Net Standard 2.0 #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ x64/
*.Publish.xml

Kendo.DynamicLinq.*.nupkg
/.vs/Kendo.DynamicLinq/v15/Server/sqlite3
78 changes: 20 additions & 58 deletions Kendo.DynamicLinq/Kendo.DynamicLinq.csproj
Original file line number Diff line number Diff line change
@@ -1,64 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2BD75D53-E0EA-4995-8B0F-60AD709945AC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Kendo.DynamicLinq</RootNamespace>
<AssemblyName>Kendo.DynamicLinq</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFramework>netstandard2.0</TargetFramework>
<Copyright>Codout</Copyright>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/Codout/dlinq-helpers</PackageProjectUrl>
<PackageIconUrl>https://github.com/Codout/Codout.Framework/raw/master/logo-nuget.png</PackageIconUrl>
<RepositoryUrl>https://github.com/Codout/dlinq-helpers</RepositoryUrl>
<PackageTags>Codout, Kendo</PackageTags>
<PackageReleaseNotes>Conversão para .Net Standard 2.0</PackageReleaseNotes>
<PackageId>Codout.Kendo.DynamicLinq</PackageId>
<Authors>Codout.Kendo.DynamicLinq</Authors>
<Company>Codout.Kendo.DynamicLinq</Company>
<Product>Codout.Kendo.DynamicLinq</Product>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Linq.Dynamic">
<HintPath>..\packages\System.Linq.Dynamic.1.0.0\lib\net40\System.Linq.Dynamic.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
</ItemGroup>

<ItemGroup>
<Compile Include="Aggregate.cs" />
<Compile Include="DataSourceRequest.cs" />
<Compile Include="DataSourceResult.cs" />
<Compile Include="Filter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="QueryableExtensions.cs" />
<Compile Include="Sort.cs" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.8.18" />
</ItemGroup>

<ItemGroup>
<None Include="Kendo.DynamicLinq.nuspec" />
<None Include="packages.config" />
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
16 changes: 0 additions & 16 deletions Kendo.DynamicLinq/Kendo.DynamicLinq.nuspec

This file was deleted.

33 changes: 0 additions & 33 deletions Kendo.DynamicLinq/Properties/AssemblyInfo.cs

This file was deleted.

8 changes: 4 additions & 4 deletions Kendo.DynamicLinq/QueryableExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic;
using System.Linq.Dynamic.Core;
using System.Linq.Expressions;
using DynamicExpression = System.Linq.Dynamic.DynamicExpression;

namespace Kendo.DynamicLinq
{
Expand Down Expand Up @@ -123,14 +122,15 @@ private static object Aggregate<T>(IQueryable<T> queryable, IEnumerable<Aggregat

fieldProps.Add(new DynamicProperty(aggregate.Aggregate, typeof(object)), val);
}
type = DynamicExpression.CreateClass(fieldProps.Keys);

type = DynamicClassFactory.CreateType(fieldProps.Select(x => x.Key).ToList());
var fieldObj = Activator.CreateInstance(type);
foreach (var p in fieldProps.Keys)
type.GetProperty(p.Name).SetValue(fieldObj, fieldProps[p], null);
objProps.Add(new DynamicProperty(group.Key, fieldObj.GetType()), fieldObj);
}

type = DynamicExpression.CreateClass(objProps.Keys);
type = DynamicClassFactory.CreateType(objProps.Select(x => x.Key).ToList());

var obj = Activator.CreateInstance(type);

Expand Down
4 changes: 0 additions & 4 deletions Kendo.DynamicLinq/packages.config

This file was deleted.