Skip to content

Commit 2042870

Browse files
committed
Feat: Added Support for AWS AU Region, Version bump and Test case Fixes
1 parent b1b268e commit 2042870

7 files changed

Lines changed: 29 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### Version: 2.24.0
2+
#### Date: Sep-29-2025
3+
4+
##### Feat:
5+
- Added Support For AWS-AU Region
6+
17
### Version: 2.23.0
28
#### Date: Aug-05-2025
39

Contentstack.Core.Tests/EntryTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public async Task GetHTMLText()
339339
{
340340
ContentType contenttype = client.ContentType(source);
341341

342-
string uid = await GetUID("source");
342+
string uid = await GetUID("source1");
343343
Entry sourceEntry = contenttype.Entry(uid);
344344

345345
var result = await sourceEntry.Fetch<SourceModel>();

Contentstack.Core.Tests/QueryTest.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public async Task GreaterThanForNumber()
174174
public async Task GreaterThanForDate()
175175
{
176176
Query query = client.ContentType(source).Query();
177-
query.GreaterThan("date", "2018-05-04");
177+
query.GreaterThan("date", "2015-05-03");
178178
var result = await query.Find<SourceModel>();
179179
if (result == null && result.Items.Count() == 0)
180180
{
@@ -188,7 +188,7 @@ public async Task GreaterThanForDate()
188188
bool IsTrue = false;
189189
foreach (var data in result.Items)
190190
{
191-
IsTrue = DateTime.Compare(DateTime.Parse(Convert.ToString(data.Date)), DateTime.Parse("2018-05-04")) > 0;
191+
IsTrue = DateTime.Compare(DateTime.Parse(Convert.ToString(data.Date)), DateTime.Parse("2015-05-03")) > 0;
192192
if (!IsTrue)
193193
break;
194194

@@ -291,14 +291,14 @@ public async Task LessThanForDate()
291291
{
292292

293293
Query query = client.ContentType(source).Query();
294-
query.LessThan("date", "2018-05-04");
294+
query.LessThan("date", "2025-05-04");
295295
var result = await query.Find<SourceModel>();
296296
if (result.Items != null)
297297
{
298298
bool IsTrue = false;
299299
foreach (var data in result.Items)
300300
{
301-
DateTime dateToCompareWith = DateTime.Parse("2018-05-04");
301+
DateTime dateToCompareWith = DateTime.Parse("2025-05-04");
302302
DateTime dateToCompare = DateTime.Parse(Convert.ToString(data.Date));
303303
IsTrue = DateTime.Compare(dateToCompare, dateToCompareWith) < 0;
304304
if (!IsTrue)
@@ -596,7 +596,7 @@ public async Task WhereForBoolen()
596596
public async Task NotEqualToForBoolean()
597597
{
598598
Query query = client.ContentType(source).Query();
599-
query.NotEqualTo("boolean", true);
599+
query.NotEqualTo("boolean", false);
600600
var result = await query.Find<SourceModel>();
601601
if (result == null && result.Items.Count() == 0)
602602
{
@@ -611,7 +611,7 @@ public async Task NotEqualToForBoolean()
611611
bool IsTrue = false;
612612
foreach (var data in result.Items)
613613
{
614-
IsTrue = data.Boolean.Equals(false);
614+
IsTrue = data.Boolean.Equals(true);
615615
if (!IsTrue)
616616
break;
617617
}
@@ -772,7 +772,7 @@ public async Task ContainedInForText()
772772
public async Task ContainedInForNumber()
773773
{
774774
Query query = client.ContentType(source).Query();
775-
query.ContainedIn("number", new object[] { 12, 3 });
775+
query.ContainedIn("number", new object[] { 4 });
776776
var result = await query.Find<SourceModel>();
777777
if (result == null && result.Items.Count() == 0)
778778
{
@@ -789,7 +789,7 @@ public async Task ContainedInForNumber()
789789
foreach (var data in result.Items)
790790
{
791791

792-
IsTrue = data.Number == 12 || data.Number == 3;
792+
IsTrue = data.Number == 4 || data.Number == 3;
793793
if (!IsTrue)
794794
break;
795795
}
@@ -840,7 +840,7 @@ public async Task ContainedInForDate()
840840
public async Task ContainedInForGroup()
841841
{
842842
Query query = client.ContentType(source).Query();
843-
query.ContainedIn("group.name", new object[] { "First", "third" });
843+
query.ContainedIn("group.name", new object[] { "Forth" });
844844
var result = await query.Find<SourceModel>();
845845
if (result == null && result.Items.Count() == 0)
846846
{
@@ -861,7 +861,7 @@ public async Task ContainedInForGroup()
861861
{
862862
if (item.Key.Equals("name"))
863863
{
864-
IsTrue = Convert.ToString(item.Value).Equals("First") || Convert.ToString(item.Value).Equals("third");
864+
IsTrue = Convert.ToString(item.Value).Equals("Forth") || Convert.ToString(item.Value).Equals("third");
865865
}
866866
}
867867
}

Contentstack.Core/Configuration/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ internal string HostURL
120120
{
121121
get
122122
{
123-
if (Region == ContentstackRegion.EU || Region == ContentstackRegion.AZURE_EU || Region == ContentstackRegion.AZURE_NA || Region == ContentstackRegion.GCP_NA)
123+
if (Region == ContentstackRegion.EU || Region == ContentstackRegion.AZURE_EU || Region == ContentstackRegion.AZURE_NA || Region == ContentstackRegion.GCP_NA || Region==ContentstackRegion.AU)
124124
return "cdn.contentstack.com";
125125
return "cdn.contentstack.io";
126126
}

Contentstack.Core/Internals/ContentstackRegion.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ public enum ContentstackRegion
2626
/// <summary>
2727
/// To specify GCP_NA region.
2828
/// </summary>
29-
GCP_NA
29+
GCP_NA,
30+
31+
/// <summary>
32+
/// To specify AWS_AU region.
33+
/// </summary>
34+
AU
3035
}
3136

3237

@@ -40,7 +45,9 @@ internal enum ContentstackRegionCode
4045

4146
azure_na,
4247

43-
gcp_na
48+
gcp_na,
49+
50+
au,
4451

4552
}
4653
}

Contentstack.Core/Internals/HttpRequestHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task<string> ProcessRequest(string Url, Dictionary<string, object>
4848
var request = (HttpWebRequest)WebRequest.Create(uri);
4949
request.Method = "GET";
5050
request.ContentType = "application/json";
51-
request.Headers["x-user-agent"]="contentstack-delivery-dotnet/2.23.0";
51+
request.Headers["x-user-agent"]="contentstack-delivery-dotnet/2.24.0";
5252
request.Timeout = timeout;
5353

5454
if (proxy != null)

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>2.23.0</Version>
3+
<Version>2.24.0</Version>
44
</PropertyGroup>
55
</Project>

0 commit comments

Comments
 (0)