Skip to content

Commit ed1ff82

Browse files
committed
IGNITE-2662 .NET Core and cross-platform (Linux) support
This closes apache#3061
1 parent 8ba8ba8 commit ed1ff82

File tree

81 files changed

+2459
-1018
lines changed

Some content is hidden

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

81 files changed

+2459
-1018
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ git-patch-prop-local.sh
2828
/modules/platforms/**/*.VC.db
2929
**/dotnet/libs/
3030
*.classname*
31+
*.exe
3132

3233
#Visual Studio files
3334
*.[Oo]bj

modules/platforms/dotnet/Apache.Ignite.AspNet/Apache.Ignite.AspNet.nuspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,8 @@ More info: https://apacheignite-net.readme.io/
5151
<dependency id="Apache.Ignite" version="[$version$]" />
5252
</dependencies>
5353
</metadata>
54+
<files>
55+
<file src="bin\$configuration$\Apache.Ignite.AspNet.dll" target="lib\net40" />
56+
<file src="bin\$configuration$\Apache.Ignite.AspNet.xml" target="lib\net40" />
57+
</files>
5458
</package>
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
6+
<IsPackable>false</IsPackable>
7+
8+
<StartupObject>Apache.Ignite.Core.Tests.DotNetCore.Common.TestRunner</StartupObject>
9+
10+
<ApplicationIcon />
11+
12+
<OutputType>Exe</OutputType>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<Compile Include="..\Apache.Ignite.Core.Tests\AssertExtensions.cs" Link="Common\AssertExtensions.cs" />
17+
<Compile Include="..\Apache.Ignite.Core.Tests\BinaryConfigurationTest.cs" Link="Binary\BinaryConfigurationTest.cs" />
18+
<Compile Include="..\Apache.Ignite.Core.Tests\Binary\BinaryDateTimeTest.cs" Link="Binary\BinaryDateTimeTest.cs" />
19+
<Compile Include="..\Apache.Ignite.Core.Tests\Binary\JavaBinaryInteropTest.cs" Link="Binary\JavaBinaryInteropTest.cs" />
20+
<Compile Include="..\Apache.Ignite.Core.Tests\Binary\Serializable\AdvancedSerializationTest.cs" Link="Binary\Serializable\AdvancedSerializationTest.cs" />
21+
<Compile Include="..\Apache.Ignite.Core.Tests\Binary\Serializable\CallbacksTest.cs" Link="Binary\Serializable\CallbacksTest.cs" />
22+
<Compile Include="..\Apache.Ignite.Core.Tests\Binary\Serializable\GenericCollectionsTest.cs" Link="Binary\Serializable\GenericCollectionsTest.cs" />
23+
<Compile Include="..\Apache.Ignite.Core.Tests\Binary\Serializable\SqlDmlTest.cs" Link="Binary\Serializable\SqlDmlTest.cs" />
24+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\AddArgCacheEntryProcessor.cs" Link="Cache\AddArgCacheEntryProcessor.cs" />
25+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\BinarizableAddArgCacheEntryProcessor.cs" Link="Cache\BinarizableAddArgCacheEntryProcessor.cs" />
26+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\BinarizableTestException.cs" Link="Cache\BinarizableTestException.cs" />
27+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\CacheAbstractTest.cs" Link="Cache\CacheAbstractTest.cs" />
28+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\CacheAbstractTransactionalTest.cs" Link="Cache\CacheAbstractTransactionalTest.cs" />
29+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\CachePartitionedTest.cs" Link="Cache\CachePartitionedTest.cs" />
30+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\CacheTestAsyncWrapper.cs" Link="Cache\CacheTestAsyncWrapper.cs" />
31+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\CacheTestKey.cs" Link="Cache\CacheTestKey.cs" />
32+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\DataRegionMetricsTest.cs" Link="Cache\DataRegionMetricsTest.cs" />
33+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\NonSerializableCacheEntryProcessor.cs" Link="Cache\NonSerializableCacheEntryProcessor.cs" />
34+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\NonSerializableException.cs" Link="Cache\NonSerializableException.cs" />
35+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\PersistenceTest.cs" Link="Cache\PersistenceTest.cs" />
36+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\CacheDmlQueriesTest.cs" Link="Cache\Query\CacheDmlQueriesTest.cs" />
37+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\CacheDmlQueriesTestSimpleName.cs" Link="Cache\Query\CacheDmlQueriesTestSimpleName.cs" />
38+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\CacheQueriesCodeConfigurationTest.cs" Link="Cache\Query\CacheQueriesCodeConfigurationTest.cs" />
39+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\CacheQueriesTest.cs" Link="Cache\Query\CacheQueriesTest.cs" />
40+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\CacheQueriesTestSimpleName.cs" Link="Cache\Query\CacheQueriesTestSimpleName.cs" />
41+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Aggregates.cs" Link="Cache\Query\Linq\CacheLinqTest.Aggregates.cs" />
42+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Base.cs" Link="Cache\Query\Linq\CacheLinqTest.Base.cs" />
43+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.CompiledQuery.cs" Link="Cache\Query\Linq\CacheLinqTest.CompiledQuery.cs" />
44+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Contains.cs" Link="Cache\Query\Linq\CacheLinqTest.Contains.cs" />
45+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Custom.cs" Link="Cache\Query\Linq\CacheLinqTest.Custom.cs" />
46+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.DateTime.cs" Link="Cache\Query\Linq\CacheLinqTest.DateTime.cs" />
47+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Functions.cs" Link="Cache\Query\Linq\CacheLinqTest.Functions.cs" />
48+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Introspection.cs" Link="Cache\Query\Linq\CacheLinqTest.Introspection.cs" />
49+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Join.cs" Link="Cache\Query\Linq\CacheLinqTest.Join.cs" />
50+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Join.LocalCollection.cs" Link="Cache\Query\Linq\CacheLinqTest.Join.LocalCollection.cs" />
51+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Misc.cs" Link="Cache\Query\Linq\CacheLinqTest.Misc.cs" />
52+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Numerics.cs" Link="Cache\Query\Linq\CacheLinqTest.Numerics.cs" />
53+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTest.Strings.cs" Link="Cache\Query\Linq\CacheLinqTest.Strings.cs" />
54+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTestSimpleName.cs" Link="Cache\Query\Linq\CacheLinqTestSimpleName.cs" />
55+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\Query\Linq\CacheLinqTestSqlEscapeAll.cs" Link="Cache\Query\Linq\CacheLinqTestSqlEscapeAll.cs" />
56+
<Compile Include="..\Apache.Ignite.Core.Tests\Cache\TestReferenceObject.cs" Link="Cache\TestReferenceObject.cs" />
57+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\Cache\CacheTest.cs" Link="ThinClient\Cache\CacheTest.cs" />
58+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\Cache\EmptyObject.cs" Link="ThinClient\Cache\EmptyObject.cs" />
59+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\Cache\Person.cs" Link="ThinClient\Cache\Person.cs" />
60+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\Cache\ScanQueryTest.cs" Link="ThinClient\Cache\ScanQueryTest.cs" />
61+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\Cache\SqlQueryTest.cs" Link="ThinClient\Cache\SqlQueryTest.cs" />
62+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\ClientConnectionTest.cs" Link="ThinClient\ClientConnectionTest.cs" />
63+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\ClientTestBase.cs" Link="ThinClient\ClientTestBase.cs" />
64+
<Compile Include="..\Apache.Ignite.Core.Tests\Client\IgniteClientConfigurationTest.cs" Link="ThinClient\IgniteClientConfigurationTest.cs" />
65+
<Compile Include="..\Apache.Ignite.Core.Tests\Compute\ComputeApiTest.cs" Link="Compute\ComputeApiTest.cs" />
66+
<Compile Include="..\Apache.Ignite.Core.Tests\DataStructures\AtomicLongTest.cs" Link="DataStructures\AtomicLongTest.cs" />
67+
<Compile Include="..\Apache.Ignite.Core.Tests\DataStructures\AtomicReferenceTest.cs" Link="DataStructures\AtomicReferenceTest.cs" />
68+
<Compile Include="..\Apache.Ignite.Core.Tests\DataStructures\AtomicSequenceTest.cs" Link="DataStructures\AtomicSequenceTest.cs" />
69+
<Compile Include="..\Apache.Ignite.Core.Tests\EventsTestLocalListeners.cs" Link="Common\EventsTestLocalListeners.cs" />
70+
<Compile Include="..\Apache.Ignite.Core.Tests\IgniteTestBase.cs" Link="Common\IgniteTestBase.cs" />
71+
<Compile Include="..\Apache.Ignite.Core.Tests\Log\CustomLoggerTest.cs" Link="Log\CustomLoggerTest.cs" />
72+
<Compile Include="..\Apache.Ignite.Core.Tests\MessagingTest.cs" Link="Common\MessagingTest.cs" />
73+
<Compile Include="..\Apache.Ignite.Core.Tests\Query\BinarizablePerson.cs" Link="Cache\Query\BinarizablePerson.cs" />
74+
<Compile Include="..\Apache.Ignite.Core.Tests\TestUtils.Common.cs" Link="Common\TestUtils.Common.cs" />
75+
</ItemGroup>
76+
77+
<ItemGroup>
78+
<Content Include="..\Apache.Ignite.Core.Tests\Config\cache-binarizables.xml" Link="Config\cache-binarizables.xml">
79+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
80+
</Content>
81+
<Content Include="..\Apache.Ignite.Core.Tests\Config\cache-query.xml" Link="Config\cache-query.xml">
82+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
83+
</Content>
84+
<Content Include="..\Apache.Ignite.Core.Tests\Config\Compute\compute-grid1.xml" Link="Config\Compute\compute-grid1.xml">
85+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
86+
</Content>
87+
<Content Include="..\Apache.Ignite.Core.Tests\Config\Compute\compute-grid2.xml" Link="Config\Compute\compute-grid2.xml">
88+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
89+
</Content>
90+
<Content Include="..\Apache.Ignite.Core.Tests\Config\Compute\compute-grid3.xml" Link="Config\Compute\compute-grid3.xml">
91+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
92+
</Content>
93+
<Content Include="..\Apache.Ignite.Core.Tests\Config\native-client-test-cache.xml" Link="Config\native-client-test-cache.xml">
94+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
95+
</Content>
96+
<Content Include="..\Apache.Ignite.Core.Tests\Config\spring-test.xml" Link="Config\spring-test.xml">
97+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
98+
</Content>
99+
</ItemGroup>
100+
101+
<ItemGroup>
102+
<PackageReference Include="Apache.Ignite" Version="0.0.1-test" />
103+
<PackageReference Include="Apache.Ignite.Linq" Version="0.0.1-test" />
104+
<PackageReference Include="Apache.Ignite.Schema" Version="0.0.1-test" />
105+
<PackageReference Include="Apache.Ignite.NLog" Version="0.0.1-test" />
106+
<PackageReference Include="Apache.Ignite.log4net" Version="0.0.1-test" />
107+
<PackageReference Include="log4net" Version="2.0.5" />
108+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
109+
<PackageReference Include="NLog" Version="4.4.12" />
110+
<PackageReference Include="NUnit" Version="3.8.1" />
111+
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
112+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.0" />
113+
</ItemGroup>
114+
115+
<ItemGroup>
116+
<Folder Include="Binary\Serializable\" />
117+
<Folder Include="Cache\Query\Linq\" />
118+
<Folder Include="Cache\Query\" />
119+
<Folder Include="Compute\" />
120+
<Folder Include="Config\Compute\" />
121+
<Folder Include="Log\" />
122+
<Folder Include="DataStructures\" />
123+
<Folder Include="ThinClient\Cache\" />
124+
</ItemGroup>
125+
126+
<ItemGroup>
127+
<None Include="Common\TestUtils.DotNetCore.cs" />
128+
</ItemGroup>
129+
130+
<ItemGroup>
131+
<None Update="app.config">
132+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
133+
</None>
134+
</ItemGroup>
135+
136+
</Project>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27004.2006
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Ignite.Core.Tests.DotNetCore", "Apache.Ignite.Core.Tests.DotNetCore.csproj", "{470E5BC1-61DC-4B42-90B6-9269B476C070}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{70803854-079D-4BA7-8A46-21A13D8AF9D6}"
9+
ProjectSection(SolutionItems) = preProject
10+
NuGet.config = NuGet.config
11+
README.txt = README.txt
12+
EndProjectSection
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{470E5BC1-61DC-4B42-90B6-9269B476C070}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{470E5BC1-61DC-4B42-90B6-9269B476C070}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{470E5BC1-61DC-4B42-90B6-9269B476C070}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{470E5BC1-61DC-4B42-90B6-9269B476C070}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {7BD29E51-C041-4E66-8DC4-8F8B6B917864}
30+
EndGlobalSection
31+
EndGlobal
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp70</s:String>
3+
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=silent/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="silent"&gt;&lt;CSReorderTypeMembers&gt;True&lt;/CSReorderTypeMembers&gt;&lt;CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="False" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" /&gt;&lt;RemoveCodeRedundancies&gt;True&lt;/RemoveCodeRedundancies&gt;&lt;CSArrangeQualifiers&gt;True&lt;/CSArrangeQualifiers&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;/Profile&gt;</s:String>
4+
<s:String x:Key="/Default/CodeStyle/CodeCleanup/SilentCleanupProfile/@EntryValue">silent</s:String>
5+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentSubtags/@EntryValue">DoNotTouch</s:String>
6+
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/IndentTagContent/@EntryValue">DoNotTouch</s:String>
7+
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">True</s:Boolean>
8+
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">True</s:Boolean>
9+
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertClosureToMethodGroup/@EntryIndexedValue">DO_NOT_SHOW</s:String>
10+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
11+
<s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean>
12+
<s:Boolean x:Key="/Default/Environment/UnitTesting/WrapLongLinesInUnitTestSessionOutput/@EntryValue">False</s:Boolean>
13+
</wpf:ResourceDictionary>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
namespace Apache.Ignite.Core.Tests.DotNetCore.Cache
19+
{
20+
using System.Threading.Tasks;
21+
using Apache.Ignite.Core.Cache;
22+
using Apache.Ignite.Core.Tests.DotNetCore.Common;
23+
using NUnit.Framework;
24+
25+
/// <summary>
26+
/// Cache tests.
27+
/// </summary>
28+
public class CacheTest : TestBase
29+
{
30+
/// <summary>
31+
/// Tests the put / get functionality.
32+
/// </summary>
33+
[Test]
34+
public void TestPutGet()
35+
{
36+
async Task PutGetAsync(ICache<int, Person> cache)
37+
{
38+
await cache.PutAsync(2, new Person("Bar", 2));
39+
var res = await cache.GetAsync(2);
40+
Assert.AreEqual(2, res.Id);
41+
}
42+
43+
using (var ignite = Start())
44+
{
45+
var cache = ignite.CreateCache<int, Person>("persons");
46+
47+
// Sync.
48+
cache[1] = new Person("Foo", 1);
49+
Assert.AreEqual("Foo", cache[1].Name);
50+
51+
// Async.
52+
PutGetAsync(cache).Wait();
53+
}
54+
}
55+
}
56+
}

0 commit comments

Comments
 (0)