Skip to content

Commit 59b8fec

Browse files
committed
feat: bug fixes and general improvements
1 parent 6937992 commit 59b8fec

5 files changed

Lines changed: 35 additions & 22 deletions

File tree

src/WebExpress.WebIndex.Test/WebExpress.WebIndex.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
30+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
3131
<PackageReference Include="xunit" Version="2.9.3" />
32-
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
32+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
3333
<PrivateAssets>all</PrivateAssets>
3434
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3535
</PackageReference>

src/WebExpress.WebIndex.WiUI/Model/MainViewModel.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,21 @@ public Project? SelectedProject
4747
{
4848
_selectedProject = value; OnPropertyChanged();
4949

50+
if (_selectedProject?.IndexPath != null && !Directory.Exists(_selectedProject?.IndexPath))
51+
{
52+
Indexes = new ObservableCollection<Index>();
53+
54+
return;
55+
}
56+
5057
Indexes = Directory
51-
.GetFiles(SelectedProject?.IndexPath ?? Environment.CurrentDirectory)
52-
.Where(x => x.EndsWith(".ws"))
53-
.Select(x => new Index()
54-
{
55-
Name = Path.GetFileNameWithoutExtension(x),
56-
FileNameWithPath = x
57-
}).ToObservableCollection();
58+
.GetFiles(_selectedProject?.IndexPath ?? Environment.CurrentDirectory)
59+
.Where(x => x.EndsWith(".ws"))
60+
.Select(x => new Index()
61+
{
62+
Name = Path.GetFileNameWithoutExtension(x),
63+
FileNameWithPath = x
64+
}).ToObservableCollection();
5865
}
5966
}
6067

src/WebExpress.WebIndex.WiUI/WebExpress.WebIndex.WiUI.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
</ItemGroup>
6060

6161
<ItemGroup>
62-
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.30" />
63-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.1" />
62+
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.60" />
63+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.4" />
6464
<PackageReference Include="CommunityToolkit.Maui" Version="*" />
6565
</ItemGroup>
6666

src/WebExpress.WebIndex/Memory/IndexMemorySchema.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,15 @@ private static IEnumerable<IndexFieldData> GetFieldData(Type type, string prefix
8585
{
8686
string propertyName = string.IsNullOrEmpty(prefix) ? property.Name : $"{prefix}.{property.Name}";
8787

88-
yield return new IndexFieldData
88+
if (!property.PropertyType.IsClass || property.PropertyType == typeof(string))
8989
{
90-
Name = propertyName,
91-
Type = property.PropertyType,
92-
PropertyInfo = property
93-
};
90+
yield return new IndexFieldData
91+
{
92+
Name = propertyName,
93+
Type = property.PropertyType,
94+
PropertyInfo = property
95+
};
96+
}
9497

9598
if (property.PropertyType.IsClass && property.PropertyType != typeof(string))
9699
{

src/WebExpress.WebIndex/Storage/IndexStorageSchema.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,17 @@ private static IEnumerable<IndexFieldData> GetFieldData(Type type, string prefix
196196

197197
foreach (var property in type.GetProperties())
198198
{
199-
string propertyName = string.IsNullOrEmpty(prefix) ? property.Name : $"{prefix}.{property.Name}";
199+
var propertyName = string.IsNullOrEmpty(prefix) ? property.Name : $"{prefix}.{property.Name}";
200200

201-
yield return new IndexFieldData
201+
if (!property.PropertyType.IsClass || property.PropertyType == typeof(string))
202202
{
203-
Name = propertyName,
204-
Type = property.PropertyType,
205-
PropertyInfo = property
206-
};
203+
yield return new IndexFieldData
204+
{
205+
Name = propertyName,
206+
Type = property.PropertyType,
207+
PropertyInfo = property
208+
};
209+
}
207210

208211
if (property.PropertyType.IsClass && property.PropertyType != typeof(string))
209212
{

0 commit comments

Comments
 (0)