Skip to content

Commit

Permalink
upd - Updated libraries
Browse files Browse the repository at this point in the history
---

Type: upd
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Sep 11, 2024
1 parent 527ff23 commit 3b8629b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 70 deletions.
29 changes: 1 addition & 28 deletions private/Nitrocid.Analyzers.Test/Nitrocid.Analyzers.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSTest.Sdk/3.5.2">
<Project Sdk="MSTest.Sdk/3.6.0">

<PropertyGroup>
<OutputPath>..\KSTest\</OutputPath>
Expand All @@ -21,31 +21,4 @@
<ProjectReference Include="..\..\public\Nitrocid.Analyzers\Nitrocid.Analyzers\Nitrocid.Analyzers.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.3.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.10.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="17.11.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.Analyzers" Version="3.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestAdapter" Version="3.5.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestFramework" Version="3.5.0" />
</ItemGroup>

</Project>
29 changes: 1 addition & 28 deletions private/Nitrocid.Tests/Nitrocid.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSTest.Sdk/3.5.2">
<Project Sdk="MSTest.Sdk/3.6.0">

<PropertyGroup>
<OutputPath>KSTest\</OutputPath>
Expand Down Expand Up @@ -90,31 +90,4 @@
<Delete Files="@(BuildDirs)" />
<RemoveDir Directories="KSTest\" />
</Target>

<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.3.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.10.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="17.11.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.Analyzers" Version="3.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestAdapter" Version="3.5.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestFramework" Version="3.5.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public static Card GetContact(int contactIndex)
cachedSearchExpression = expression;

// Get the list of cards satisfying the expression
var satisfiedCards = cards.Where((card) => RegexpTools.IsMatch(card.GetPartsArray<FullNameInfo>()[0].FullName, expression)).ToArray();
var satisfiedCards = cards.Where((card) => RegexpTools.IsMatch(card.GetPartsArray<FullNameInfo>()[0].FullName ?? "", expression)).ToArray();

// Return a card if the index is valid
if (satisfiedCards.Length > 0)
Expand Down Expand Up @@ -379,7 +379,7 @@ public static Card GetContact(int contactIndex)
throw new KernelException(KernelExceptionType.Contacts, Translate.DoTranslation("Regular expression is invalid."));

// Get the list of cards satisfying the expression
var satisfiedCards = cards.Where((card) => RegexpTools.IsMatch(card.GetPartsArray<FullNameInfo>()[0].FullName, expression)).ToArray();
var satisfiedCards = cards.Where((card) => RegexpTools.IsMatch(card.GetPartsArray<FullNameInfo>()[0].FullName ?? "", expression)).ToArray();

// Compare between the cached expression and the given expression
if (expression == cachedSearchExpression)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public override string GetEntryFromItem(Card item)
Card contact = item;
if (contact is null)
return "";
return contact.GetPartsArray<FullNameInfo>()[0].FullName;
return contact.GetPartsArray<FullNameInfo>()[0].FullName ?? "";
}

internal void RemoveContact(int index) =>
Expand Down Expand Up @@ -289,13 +289,13 @@ internal string GetContactAddressFinal(Card card)

var address = card.GetPartsArray<AddressInfo>()[0];
List<string> fullElements = [];
string street = address.StreetAddress;
string postal = address.PostalCode;
string poBox = address.PostOfficeBox;
string extended = address.ExtendedAddress;
string locality = address.Locality;
string region = address.Region;
string country = address.Country;
string street = address.StreetAddress ?? "";
string postal = address.PostalCode ?? "";
string poBox = address.PostOfficeBox ?? "";
string extended = address.ExtendedAddress ?? "";
string locality = address.Locality ?? "";
string region = address.Region ?? "";
string country = address.Country ?? "";
if (!string.IsNullOrEmpty(street))
fullElements.Add(street);
if (!string.IsNullOrEmpty(postal))
Expand Down Expand Up @@ -360,9 +360,9 @@ internal string GetContactOrganizationFinal(Card card)

var org = card.GetPartsArray<OrganizationInfo>()[0];
List<string> fullElements = [];
string name = org.Name;
string unit = org.Unit;
string role = org.Role;
string name = org.Name ?? "";
string unit = org.Unit ?? "";
string role = org.Role ?? "";
if (!string.IsNullOrEmpty(name))
fullElements.Add(name);
if (!string.IsNullOrEmpty(unit))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<!-- Extras.Contacts addon Platform Information End -->

<ItemGroup>
<PackageReference Include="VisualCard" Version="2.0.0" />
<PackageReference Include="VisualCard" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 3b8629b

Please sign in to comment.