Skip to content

Commit 46a5c75

Browse files
authored
Release 1.0.0 (#5)
1 parent f7d53b5 commit 46a5c75

34 files changed

+599
-204
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,4 @@ ModelManifest.xml
240240

241241
# FAKE - F# Make
242242
.fake/
243+
OptimizelySDK/nuget.exe

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: csharp
2+
solution: "./OptimizelySDK.Travis.sln"
3+
install:
4+
- nuget restore ./OptimizelySDK.Travis.sln
5+
- nuget install ./OptimizelySDK.Tests/packages.config -OutputDirectory ./packages
6+
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory ./testrunner
7+
script:
8+
- xbuild /p:Configuration=Release ./OptimizelySDK.Travis.sln
9+
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./OptimizelySDK.Tests/bin/Release/OptimizelySDK.Tests.dll

OptimizelySDK.DemoApp/Controllers/DemoController.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,13 @@ public ActionResult Buy(int visitorId, int productId)
154154
{
155155
// buy the item (record the conversion)
156156
var visitor = VisitorRepo.Single(v => v.Id == visitorId);
157+
Entity.EventTags eventTags = new Entity.EventTags();
158+
eventTags.Add("int_param", 4242);
159+
eventTags.Add("string_param", "4242");
160+
eventTags.Add("bool_param", true);
161+
eventTags.Add("revenue", 1337);
157162

158-
Optimizely.Track("AddToCart", Convert.ToString(visitorId), visitor.GetUserAttributes());
163+
Optimizely.Track("add_to_cart", Convert.ToString(visitorId), visitor.GetUserAttributes(), eventTags);
159164
TempData["Message"] = string.Format("Successfully Purchased item {0} for visitor {1}", productId, visitorId);
160165

161166
return RedirectToAction("Shop");

OptimizelySDK.DemoApp/OptimizelySDK.DemoApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<WarningLevel>4</WarningLevel>
3838
</PropertyGroup>
3939
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
40-
<DebugType>pdbonly</DebugType>
40+
<DebugType>none</DebugType>
4141
<Optimize>true</Optimize>
4242
<OutputPath>bin\</OutputPath>
4343
<DefineConstants>TRACE</DefineConstants>
Binary file not shown.
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{C8FF7012-37B7-4D64-AB45-0C62195302EC}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>OptimizelySDK.Net35</RootNamespace>
11+
<AssemblyName>OptimizelySDK.Net35</AssemblyName>
12+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE;NET35</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="MurmurHash, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
34+
<HintPath>..\packages\murmurhash.1.0.0\lib\net35\MurmurHash.dll</HintPath>
35+
<Private>True</Private>
36+
</Reference>
37+
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
38+
<SpecificVersion>False</SpecificVersion>
39+
<HintPath>JsonNet\Newtonsoft.Json.dll</HintPath>
40+
</Reference>
41+
<Reference Include="System" />
42+
<Reference Include="System.Core" />
43+
<Reference Include="System.Xml.Linq" />
44+
<Reference Include="System.Data.DataSetExtensions" />
45+
<Reference Include="System.Data" />
46+
<Reference Include="System.Xml" />
47+
</ItemGroup>
48+
<ItemGroup>
49+
<Compile Include="..\OptimizelySDK\Bucketer.cs">
50+
<Link>Bucketer.cs</Link>
51+
</Compile>
52+
<Compile Include="..\OptimizelySDK\Entity\Attribute.cs">
53+
<Link>Entity\Attribute.cs</Link>
54+
</Compile>
55+
<Compile Include="..\OptimizelySDK\Entity\Audience.cs">
56+
<Link>Entity\Audience.cs</Link>
57+
</Compile>
58+
<Compile Include="..\OptimizelySDK\Entity\Entity.cs">
59+
<Link>Entity\Entity.cs</Link>
60+
</Compile>
61+
<Compile Include="..\OptimizelySDK\Entity\Event.cs">
62+
<Link>Entity\Event.cs</Link>
63+
</Compile>
64+
<Compile Include="..\OptimizelySDK\Entity\EventAttributes.cs">
65+
<Link>Entity\EventAttributes.cs</Link>
66+
</Compile>
67+
<Compile Include="..\OptimizelySDK\Entity\Experiment.cs">
68+
<Link>Entity\Experiment.cs</Link>
69+
</Compile>
70+
<Compile Include="..\OptimizelySDK\Entity\ForcedVariation.cs">
71+
<Link>Entity\ForcedVariation.cs</Link>
72+
</Compile>
73+
<Compile Include="..\OptimizelySDK\Entity\Group.cs">
74+
<Link>Entity\Group.cs</Link>
75+
</Compile>
76+
<Compile Include="..\OptimizelySDK\Entity\IdKeyEntity.cs">
77+
<Link>Entity\IdKeyEntity.cs</Link>
78+
</Compile>
79+
<Compile Include="..\OptimizelySDK\Entity\TrafficAllocation.cs">
80+
<Link>Entity\TrafficAllocation.cs</Link>
81+
</Compile>
82+
<Compile Include="..\OptimizelySDK\Entity\UserAttributes.cs">
83+
<Link>Entity\UserAttributes.cs</Link>
84+
</Compile>
85+
<Compile Include="..\OptimizelySDK\Entity\Variation.cs">
86+
<Link>Entity\Variation.cs</Link>
87+
</Compile>
88+
<Compile Include="..\OptimizelySDK\ErrorHandler\DefaultErrorHandler.cs">
89+
<Link>ErrorHandler\DefaultErrorHandler.cs</Link>
90+
</Compile>
91+
<Compile Include="..\OptimizelySDK\ErrorHandler\IErrorHandler.cs">
92+
<Link>ErrorHandler\IErrorHandler.cs</Link>
93+
</Compile>
94+
<Compile Include="..\OptimizelySDK\ErrorHandler\NoOpErrorHandler.cs">
95+
<Link>ErrorHandler\NoOpErrorHandler.cs</Link>
96+
</Compile>
97+
<Compile Include="..\OptimizelySDK\Event\Builder\EventBuilder.cs">
98+
<Link>Event\EventBuilder.cs</Link>
99+
</Compile>
100+
<Compile Include="..\OptimizelySDK\Event\Builder\Params.cs">
101+
<Link>Event\Params.cs</Link>
102+
</Compile>
103+
<Compile Include="..\OptimizelySDK\Event\Dispatcher\DefaultEventDispatcher.cs">
104+
<Link>Event\DefaultEventDispatcher.cs</Link>
105+
</Compile>
106+
<Compile Include="..\OptimizelySDK\Event\Dispatcher\IEventDispatcher.cs">
107+
<Link>Event\IEventDispatcher.cs</Link>
108+
</Compile>
109+
<Compile Include="..\OptimizelySDK\Event\Dispatcher\WebRequestEventDispatcher35.cs">
110+
<Link>Event\WebRequestEventDispatcher35.cs</Link>
111+
</Compile>
112+
<Compile Include="..\OptimizelySDK\Event\LogEvent.cs">
113+
<Link>Event\LogEvent.cs</Link>
114+
</Compile>
115+
<Compile Include="..\OptimizelySDK\Exceptions\OptimizelyException.cs">
116+
<Link>Exceptions\OptimizelyException.cs</Link>
117+
</Compile>
118+
<Compile Include="..\OptimizelySDK\Logger\DefaultLogger.cs">
119+
<Link>Logger\DefaultLogger.cs</Link>
120+
</Compile>
121+
<Compile Include="..\OptimizelySDK\Logger\ILogger.cs">
122+
<Link>Logger\ILogger.cs</Link>
123+
</Compile>
124+
<Compile Include="..\OptimizelySDK\Logger\NoOpLogger.cs">
125+
<Link>Logger\NoOpLogger.cs</Link>
126+
</Compile>
127+
<Compile Include="..\OptimizelySDK\Optimizely.cs">
128+
<Link>Optimizely.cs</Link>
129+
</Compile>
130+
<Compile Include="..\OptimizelySDK\ProjectConfig.cs">
131+
<Link>ProjectConfig.cs</Link>
132+
</Compile>
133+
<Compile Include="..\OptimizelySDK\Utils\ConditionEvaluator.cs">
134+
<Link>Utils\ConditionEvaluator.cs</Link>
135+
</Compile>
136+
<Compile Include="..\OptimizelySDK\Utils\ConfigParser.cs">
137+
<Link>Utils\ConfigParser.cs</Link>
138+
</Compile>
139+
<Compile Include="..\OptimizelySDK\Utils\EventTagUtils.cs">
140+
<Link>Utils\EventTagUtils.cs</Link>
141+
</Compile>
142+
<Compile Include="..\OptimizelySDK\Utils\Schema.cs">
143+
<Link>Utils\Schema.cs</Link>
144+
</Compile>
145+
<Compile Include="..\OptimizelySDK\Utils\Validator.cs">
146+
<Link>Utils\Validator.cs</Link>
147+
</Compile>
148+
<Compile Include="Properties\AssemblyInfo.cs" />
149+
</ItemGroup>
150+
<ItemGroup>
151+
<None Include="..\OptimizelySDK\Utils\schema.json">
152+
<Link>Utils\schema.json</Link>
153+
</None>
154+
<None Include="packages.config" />
155+
</ItemGroup>
156+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
157+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
158+
Other similar extension points exist, see Microsoft.Common.targets.
159+
<Target Name="BeforeBuild">
160+
</Target>
161+
<Target Name="AfterBuild">
162+
</Target>
163+
-->
164+
</Project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("OptimizelySDK.Net35")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("OptimizelySDK.Net35")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("c8ff7012-37b7-4d64-ab45-0c62195302ec")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

OptimizelySDK.Net35/packages.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="murmurhash" version="1.0.0" targetFramework="net35" />
4+
</packages>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright 2017, Optimizely
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
namespace OptimizelySDK
17+
{
18+
public interface ICloneable
19+
{
20+
object Clone();
21+
}
22+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard1.6</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<Compile Include="..\OptimizelySDK\Bucketer.cs" />
9+
<Compile Include="..\OptimizelySDK\Entity\Attribute.cs" />
10+
<Compile Include="..\OptimizelySDK\Entity\Audience.cs" />
11+
<Compile Include="..\OptimizelySDK\Entity\Entity.cs" />
12+
<Compile Include="..\OptimizelySDK\Entity\Event.cs" />
13+
<Compile Include="..\OptimizelySDK\Entity\EventAttributes.cs" />
14+
<Compile Include="..\OptimizelySDK\Entity\Experiment.cs" />
15+
<Compile Include="..\OptimizelySDK\Entity\ForcedVariation.cs" />
16+
<Compile Include="..\OptimizelySDK\Entity\Group.cs" />
17+
<Compile Include="..\OptimizelySDK\Entity\IdKeyEntity.cs" />
18+
<Compile Include="..\OptimizelySDK\Entity\TrafficAllocation.cs" />
19+
<Compile Include="..\OptimizelySDK\Entity\UserAttributes.cs" />
20+
<Compile Include="..\OptimizelySDK\Entity\Variation.cs" />
21+
<Compile Include="..\OptimizelySDK\ErrorHandler\DefaultErrorHandler.cs" />
22+
<Compile Include="..\OptimizelySDK\ErrorHandler\IErrorHandler.cs" />
23+
<Compile Include="..\OptimizelySDK\ErrorHandler\NoOpErrorHandler.cs" />
24+
<Compile Include="..\OptimizelySDK\Event\Builder\EventBuilder.cs" />
25+
<Compile Include="..\OptimizelySDK\Event\Builder\Params.cs" />
26+
<Compile Include="..\OptimizelySDK\Event\Dispatcher\DefaultEventDispatcher.cs" />
27+
<Compile Include="..\OptimizelySDK\Event\Dispatcher\WebRequestEventDispatcher35.cs" />
28+
<Compile Include="..\OptimizelySDK\Event\Dispatcher\HttpClientEventDispatcher45.cs" />
29+
<Compile Include="..\OptimizelySDK\Event\Dispatcher\IEventDispatcher.cs" />
30+
<Compile Include="..\OptimizelySDK\Event\LogEvent.cs" />
31+
<Compile Include="..\OptimizelySDK\Exceptions\OptimizelyException.cs" />
32+
<Compile Include="..\OptimizelySDK\Logger\DefaultLogger.cs" />
33+
<Compile Include="..\OptimizelySDK\Logger\ILogger.cs" />
34+
<Compile Include="..\OptimizelySDK\Logger\NoOpLogger.cs" />
35+
<Compile Include="..\OptimizelySDK\Optimizely.cs" />
36+
<Compile Include="..\OptimizelySDK\ProjectConfig.cs" />
37+
<Compile Include="..\OptimizelySDK\Utils\ConditionEvaluator.cs" />
38+
<Compile Include="..\OptimizelySDK\Utils\EventTagUtils.cs" />
39+
<Compile Include="..\OptimizelySDK\Utils\Validator.cs" />
40+
<Compile Include="..\OptimizelySDK\Utils\ConfigParser.cs" />
41+
<Compile Include="..\OptimizelySDK\Utils\Schema.cs" />
42+
</ItemGroup>
43+
<ItemGroup>
44+
<EmbeddedResource Include="..\OptimizelySDK\Utils\schema.json">
45+
<LogicalName>OptimizelySDK.Utils.schema.json</LogicalName>
46+
</EmbeddedResource>
47+
</ItemGroup>
48+
<ItemGroup>
49+
<PackageReference Include="MurmurHash-net-core" Version="1.0.0" />
50+
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
51+
<PackageReference Include="NJsonSchema" Version="8.33.6323.36213" />
52+
</ItemGroup>
53+
54+
</Project>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>Optimizely.SDK</id>
5+
<version>0.1.0</version>
6+
<title>Optimizely C# SDK</title>
7+
<authors>Optimizely Development Team</authors>
8+
<owners>fullstack.optimizely</owners>
9+
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
10+
<!-->projectUrl></projectUrl-->
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>C# SDK for Optimizely X Fullstack</description>
13+
<releaseNotes>This is a Beta Pre-Release.</releaseNotes>
14+
<copyright>Copyright 2017</copyright>
15+
<tags>Optimizely</tags>
16+
<dependencies>
17+
<group targetFramework=".NETFramework4.5">
18+
<dependency id="JsonNet.PrivateSettersContractResolvers.Source" version="0.1.0" />
19+
<dependency id="murmurhash" version="1.0.0" />
20+
<dependency id="Newtonsoft.Json" version="9.0.1" />
21+
<dependency id="NJsonSchema" version="8.30.6304.31883" />
22+
</group>
23+
<group targetFramework=".NETFramework3.5">
24+
<dependency id="murmurhash" version="1.0.0" />
25+
<dependency id="Newtonsoft.Json" version="9.0.1" />
26+
</group>
27+
<group targetFramework=".NETStandard1.6">
28+
<dependency id="NETStandard.Library" version="1.6.1" />
29+
<dependency id="MurmurHash-net-core" version="1.0.0" />
30+
<dependency id="Newtonsoft.Json" version="9.0.1" />
31+
<dependency id="NJsonSchema" version="8.33.6323.36213" />
32+
</group>
33+
</dependencies>
34+
</metadata>
35+
<files>
36+
<file src="lib\**" target="lib" />
37+
</files>
38+
</package>

OptimizelySDK.Package/pack.ps1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$msBuildLocation="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"
2+
3+
Write-Host "Packing Optimizely SDK for NuGet"
4+
Write-Host "-"
5+
Write-Host "This script requires VS 2017 Community Edition & NuGet CLI"
6+
Write-Host "-"
7+
Write-Host "-"
8+
9+
& $msBuildLocation ..\OptimizelySDK.sln /p:Platform="Any CPU" /p:Configuration=Release /p:GenerateDocumentation=true /t:Clean,Build /nr:false /clp:Summary
10+
11+
Write-Host "-"
12+
Write-Host "-"
13+
Write-Host "Build complete. Copying files..."
14+
15+
Copy-Item -Path "..\OptimizelySDK\bin\Release\OptimizelySDK.dll" -Destination ".\lib\net45" -Recurse -force
16+
Copy-Item -Path "..\OptimizelySDK.Net35\bin\Release\OptimizelySDK.Net35.dll" -Destination ".\lib\net35" -Recurse -force
17+
Copy-Item -Path "..\OptimizelySDK.NetStandard16\bin\Release\netstandard1.6\OptimizelySDK.NetStandard16.dll" -Destination ".\lib\netstandard1.6" -Recurse -force
18+
19+
Write-Host "-"
20+
Write-Host "-"
21+
Write-Host "Creating NuGet package"
22+
23+
.\nuget pack OptimizelySDK.nuspec

0 commit comments

Comments
 (0)