diff --git a/AIDevGallery.SourceGenerator/AIDevGallery.SourceGenerator.csproj b/AIDevGallery.SourceGenerator/AIDevGallery.SourceGenerator.csproj index 9985134..09eaedc 100644 --- a/AIDevGallery.SourceGenerator/AIDevGallery.SourceGenerator.csproj +++ b/AIDevGallery.SourceGenerator/AIDevGallery.SourceGenerator.csproj @@ -3,7 +3,7 @@ netstandard2.0 enable - 12.0 + 13.0 true diff --git a/AIDevGallery.Utils/AIDevGallery.Utils.csproj b/AIDevGallery.Utils/AIDevGallery.Utils.csproj index b16fc2a..acf5a60 100644 --- a/AIDevGallery.Utils/AIDevGallery.Utils.csproj +++ b/AIDevGallery.Utils/AIDevGallery.Utils.csproj @@ -3,7 +3,7 @@ netstandard2.0;net9.0 enable - 12.0 + 13.0 diff --git a/AIDevGallery/AIDevGallery.csproj b/AIDevGallery/AIDevGallery.csproj index 19fbb24..bc8211c 100644 --- a/AIDevGallery/AIDevGallery.csproj +++ b/AIDevGallery/AIDevGallery.csproj @@ -12,6 +12,7 @@ true true enable + preview CS8305;WMC1501 $(NoWarn);IL2050 diff --git a/AIDevGallery/Pages/AddModelPage.xaml.cs b/AIDevGallery/Pages/AddModelPage.xaml.cs index 1314ba1..fd8bedb 100644 --- a/AIDevGallery/Pages/AddModelPage.xaml.cs +++ b/AIDevGallery/Pages/AddModelPage.xaml.cs @@ -321,7 +321,7 @@ internal partial class Result : ObservableObject public Visibility VisibleWhenCompatibilityIssue => Details.Compatibility.CompatibilityState == ModelCompatibilityState.Compatible ? Visibility.Collapsed : Visibility.Visible; [ObservableProperty] - private ResultState state; + public partial ResultState State { get; set; } } internal enum ResultState diff --git a/AIDevGallery/Samples/SharedCode/Message.cs b/AIDevGallery/Samples/SharedCode/Message.cs index 4620532..54521b8 100644 --- a/AIDevGallery/Samples/SharedCode/Message.cs +++ b/AIDevGallery/Samples/SharedCode/Message.cs @@ -10,7 +10,7 @@ namespace AIDevGallery.Samples.SharedCode; internal partial class Message : ObservableObject { [ObservableProperty] - private string content; + public partial string Content { get; set; } public DateTime MsgDateTime { get; private set; } public ChatRole Role { get; set; } diff --git a/AIDevGallery/ViewModels/AvailableModel.cs b/AIDevGallery/ViewModels/AvailableModel.cs index 6f95fb5..f0beea7 100644 --- a/AIDevGallery/ViewModels/AvailableModel.cs +++ b/AIDevGallery/ViewModels/AvailableModel.cs @@ -11,7 +11,7 @@ internal partial class AvailableModel : ObservableObject, IModelView public ModelDetails ModelDetails { get; private set; } [ObservableProperty] - private bool optionsVisible; + public partial bool OptionsVisible { get; set; } public AvailableModel(ModelDetails modelDetails) { diff --git a/AIDevGallery/ViewModels/BaseModel.cs b/AIDevGallery/ViewModels/BaseModel.cs index ced9f0c..2dc45d8 100644 --- a/AIDevGallery/ViewModels/BaseModel.cs +++ b/AIDevGallery/ViewModels/BaseModel.cs @@ -12,7 +12,7 @@ internal partial class BaseModel : ObservableObject, IModelView public ModelCompatibility Compatibility { get; init; } [ObservableProperty] - private bool optionsVisible; + public partial bool OptionsVisible { get; set; } public BaseModel(ModelDetails modelDetails) { diff --git a/AIDevGallery/ViewModels/DownloadableModel.cs b/AIDevGallery/ViewModels/DownloadableModel.cs index 89a58bf..5cdc87d 100644 --- a/AIDevGallery/ViewModels/DownloadableModel.cs +++ b/AIDevGallery/ViewModels/DownloadableModel.cs @@ -14,13 +14,13 @@ internal partial class DownloadableModel : BaseModel private readonly DispatcherTimer _progressTimer; [ObservableProperty] - private float progress; + public partial float Progress { get; set; } [ObservableProperty] - private bool canDownload; + public partial bool CanDownload { get; set; } [ObservableProperty] - private DownloadStatus status = DownloadStatus.Waiting; + public partial DownloadStatus Status { get; set; } = DownloadStatus.Waiting; public bool IsDownloadEnabled => Compatibility.CompatibilityState != ModelCompatibilityState.NotCompatible; diff --git a/Directory.Packages.props b/Directory.Packages.props index 7cf8312..2f21b7f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,7 +4,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -39,11 +39,11 @@ - + - - + +