Skip to content

Commit

Permalink
Merge pull request #13 from WURFL/2.2.0-dev
Browse files Browse the repository at this point in the history
2.2.0
  • Loading branch information
mbellomi authored Nov 11, 2024
2 parents 4491e94 + 38b93f4 commit d7075df
Show file tree
Hide file tree
Showing 40 changed files with 383 additions and 924 deletions.
17 changes: 0 additions & 17 deletions Example/Example-dotNetCore.csproj

This file was deleted.

27 changes: 0 additions & 27 deletions Example/Example-dotNetCore.sln

This file was deleted.

162 changes: 26 additions & 136 deletions Example/Example.csproj
Original file line number Diff line number Diff line change
@@ -1,136 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Example</RootNamespace>
<AssemblyName>Example</AssemblyName>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</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>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'UNIT_TESTS|AnyCPU'">
<OutputPath>bin\UNIT_TESTS\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'UnitTests|AnyCPU'">
<OutputPath>bin\UnitTests\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'UNIT_TESTS|x64'">
<OutputPath>bin\x64\UNIT_TESTS\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'UnitTests|x64'">
<OutputPath>bin\x64\UnitTests\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
<PackageReference Include="System.Net.Http.Formatting" Version="5.2.3" />
<PackageReference Include="System.Web.Http" Version="5.2.3" />
<PackageReference Include="System.Web.Http.WebHost" Version="5.2.3" />
<PackageReference Include="WmClient" Version="2.1.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WmClientExample.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 e x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="App_Readme\Readme.txt" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</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 Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>

<!-- AssemblyInfo in Properties folder -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

<!-- set restore source if needed.
Default to https://api.nuget.org/v3/index.json
https://apiint.nugettest.org/v3/index.json; for nuget sandbox
-->
<RestoreSources>
https://api.nuget.org/v3/index.json;
https://apiint.nugettest.org/v3/index.json;
</RestoreSources>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="ScientiaMobile.Wurfl.Microservice.Client" Version="2.2.0"/>
</ItemGroup>

</Project>
35 changes: 7 additions & 28 deletions Example/Example.sln
Original file line number Diff line number Diff line change
@@ -1,43 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32126.317
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example", "Example.csproj", "{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example", "Example.csproj", "{2B640E63-3BEE-4C37-86D3-9BC013AE1234}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
UNIT_TESTS|Any CPU = UNIT_TESTS|Any CPU
UNIT_TESTS|x64 = UNIT_TESTS|x64
UnitTests|Any CPU = UnitTests|Any CPU
UnitTests|x64 = UnitTests|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Debug|x64.ActiveCfg = Debug|x64
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Debug|x64.Build.0 = Debug|x64
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Release|Any CPU.Build.0 = Release|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Release|x64.ActiveCfg = Release|x64
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.Release|x64.Build.0 = Release|x64
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UNIT_TESTS|Any CPU.ActiveCfg = UNIT_TESTS|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UNIT_TESTS|Any CPU.Build.0 = UNIT_TESTS|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UNIT_TESTS|x64.ActiveCfg = UNIT_TESTS|x64
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UNIT_TESTS|x64.Build.0 = UNIT_TESTS|x64
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UnitTests|Any CPU.ActiveCfg = UnitTests|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UnitTests|Any CPU.Build.0 = UnitTests|Any CPU
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UnitTests|x64.ActiveCfg = UnitTests|x64
{7DB342DD-2B8C-45C5-AC07-54AE8A21D418}.UnitTests|x64.Build.0 = UnitTests|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7254ED74-D5E1-41D0-B440-106960DF967D}
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2B640E63-3BEE-4C37-86D3-9BC013AE1234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B640E63-3BEE-4C37-86D3-9BC013AE1234}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B640E63-3BEE-4C37-86D3-9BC013AE1234}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B640E63-3BEE-4C37-86D3-9BC013AE1234}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
17 changes: 9 additions & 8 deletions Example/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Wmclient;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Example")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("WmClient-Example")]
[assembly: AssemblyDescription("WURFL Microservice .NET API Example")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Example")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyCompany("ScientiaMobile, Inc.")]
[assembly: AssemblyProduct("WmClient - Example")]
[assembly: AssemblyCopyright("Copyright © ScientiaMobile, Inc. 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -20,7 +21,7 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7db342dd-2b8c-45c5-ac07-54ae8a21d418")]
[assembly: Guid("bcff5c96-7095-4097-8021-0b1fb75c9f72")]

// Version information for an assembly consists of the following four values:
//
Expand All @@ -32,5 +33,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.3")]
[assembly: AssemblyFileVersion("2.0.3")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
11 changes: 7 additions & 4 deletions NUnit-Test/LRUCacheTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ limitations under the License.
using System.Threading;
using Wmclient;

// suppressing warnings related to use of constraint/classic model. We use classic.
#pragma warning disable NUnit2005 // Consider using Assert.That(actual, Is.EqualTo(expected)) instead of ClassicAssert.AreEqual(expected, actual)

namespace NUnit_Test
{
[TestFixture]
Expand All @@ -31,7 +34,7 @@ public void LRUCache_RemoveOnMaxSizeTest()
{
cache.PutEntry(i.ToString(), new TestNode(i.ToString(), i));
}
Assert.AreEqual(cache.Size(), 5);
Assert.AreEqual(5, cache.Size());
// "0" entry has been removed when inserting "6"
Assert.Null(cache.GetEntry("0"));
}
Expand All @@ -44,7 +47,7 @@ public void LRUCache_ReplaceExistingItemTest()
{
cache.PutEntry(i.ToString(), new TestNode(i.ToString(), i));
}
Assert.AreEqual(cache.Size(), 5);
Assert.AreEqual(5, cache.Size());
// Now put an element with the same key and a different value
cache.PutEntry("2", new TestNode("2", 159));
// previous value has been overwritten
Expand All @@ -62,9 +65,9 @@ public void LRUCache_ReplaceOnMultiAddTest()

// re-add element with different value
cache.PutEntry("3", 7);
Assert.AreEqual(cache.Size(), 5);
Assert.AreEqual(5, cache.Size());
// "0" entry has been removed when inserting "6"
Assert.AreEqual(cache.GetEntry("3"), 7);
Assert.AreEqual(7,cache.GetEntry("3"));
}

[Test]
Expand Down
Loading

0 comments on commit d7075df

Please sign in to comment.