Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 895a601

Browse files
committed
Update replace code with the new DateTime initialization syntax
1 parent c9b0c2c commit 895a601

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

build/build.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
<ReplaceWith>ServiceStackVersion = $(EnvVersion)m;</ReplaceWith>
6969
</RegexTransform>
7070
<RegexTransform Include="$(SrcDir)/ServiceStack.Text/Env.cs">
71-
<Find>DateTime\.Parse.*</Find>
72-
<ReplaceWith>DateTime.Parse("$([System.DateTime]::Now.ToString(`yyyy-MM-dd`))");</ReplaceWith>
71+
<Find>new DateTime.*</Find>
72+
<ReplaceWith>new DateTime($([System.DateTime]::Now.ToString(`yyyy,MM,dd`)));</ReplaceWith>
7373
</RegexTransform>
7474
<RegexTransform Include="$(BuildSolutionDir)/tests/**/*.config">
7575
<Find>key="servicestack:license".*</Find>

tests/ServiceStack.Text.TestsConsole/Program.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.Linq;
45
using System.Text;
6+
using System.Threading;
57
using System.Threading.Tasks;
68

79
namespace ServiceStack.Text.TestsConsole
@@ -10,12 +12,16 @@ class Program
1012
{
1113
static void Main(string[] args)
1214
{
13-
var licenseKey = Environment.GetEnvironmentVariable("SERVICESTACK_LICENSE");
14-
if (licenseKey.IsNullOrEmpty())
15-
throw new ArgumentNullException("SERVICESTACK_LICENSE", "Add Environment variable for SERVICESTACK_LICENSE");
15+
//var licenseKey = Environment.GetEnvironmentVariable("SERVICESTACK_LICENSE");
16+
//if (licenseKey.IsNullOrEmpty())
17+
// throw new ArgumentNullException("SERVICESTACK_LICENSE", "Add Environment variable for SERVICESTACK_LICENSE");
1618

17-
Licensing.RegisterLicense(licenseKey);
18-
"ActivatedLicenseFeatures: ".Print(LicenseUtils.ActivatedLicenseFeatures());
19+
//Licensing.RegisterLicense(licenseKey);
20+
//"ActivatedLicenseFeatures: ".Print(LicenseUtils.ActivatedLicenseFeatures());
21+
22+
Thread.CurrentThread.CurrentCulture = new CultureInfo("ar");
23+
JsConfig.InitStatics();
24+
//JsonServiceClient client = new JsonServiceClient();
1925

2026
Console.ReadLine();
2127
}

tests/ServiceStack.Text.TestsConsole/ServiceStack.Text.TestsConsole.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35+
<Reference Include="ServiceStack.Client, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
36+
<SpecificVersion>False</SpecificVersion>
37+
<HintPath>..\..\lib\ServiceStack.Client.dll</HintPath>
38+
</Reference>
39+
<Reference Include="ServiceStack.Common, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
40+
<SpecificVersion>False</SpecificVersion>
41+
<HintPath>..\..\lib\ServiceStack.Common.dll</HintPath>
42+
</Reference>
43+
<Reference Include="ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL">
44+
<SpecificVersion>False</SpecificVersion>
45+
<HintPath>..\..\lib\ServiceStack.Interfaces.dll</HintPath>
46+
</Reference>
3547
<Reference Include="System" />
3648
<Reference Include="System.Core" />
3749
<Reference Include="System.Xml.Linq" />

0 commit comments

Comments
 (0)