Skip to content

Commit

Permalink
Housekeeping Add SDK version 7 (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman authored Nov 1, 2023
1 parent 3a59d0b commit 0c45daf
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.507" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="4.5.0" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="4.6.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<PackageId>ReactiveUI.Validation.AndroidSupport</PackageId>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;net6.0-android;net7.0-android</TargetFrameworks>
<TargetFrameworks>MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;net7.0-android</TargetFrameworks>
<PackageDescription>Provides ReactiveUI.Validation extensions for the AndroidX Library</PackageDescription>
<PackageId>ReactiveUI.Validation.AndroidX</PackageId>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<NoWarn>$(NoWarn);1591;CA1707;SA1633</NoWarn>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
16 changes: 6 additions & 10 deletions src/ReactiveUI.Validation/Formatters/SingleLineFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ namespace ReactiveUI.Validation.Formatters;
/// <summary>
/// Helper class to generate a single formatted line for a <see cref="IValidationText" />.
/// </summary>
public class SingleLineFormatter : IValidationTextFormatter<string>
/// <remarks>
/// Initializes a new instance of the <see cref="SingleLineFormatter"/> class.
/// </remarks>
/// <param name="separator">Separator string.</param>
public class SingleLineFormatter(string? separator = null) : IValidationTextFormatter<string>
{
private readonly string? _separator;

/// <summary>
/// Initializes a new instance of the <see cref="SingleLineFormatter"/> class.
/// </summary>
/// <param name="separator">Separator string.</param>
public SingleLineFormatter(string? separator = null) => _separator = separator;

/// <summary>
/// Gets the default formatter.
/// </summary>
Expand All @@ -35,6 +31,6 @@ public class SingleLineFormatter : IValidationTextFormatter<string>
/// <returns>Returns the string formatted.</returns>
public string Format(IValidationText? validationText) =>
validationText is not null
? validationText.ToSingleLine(_separator)
? validationText.ToSingleLine(separator)
: string.Empty;
}
3 changes: 1 addition & 2 deletions src/ReactiveUI.Validation/ReactiveUI.Validation.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos;net6.0-maccatalyst;net7.0;net7.0-android;net7.0-ios;net7.0-tvos;net7.0-macos;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>MonoAndroid12.0;MonoAndroid12.1;MonoAndroid13.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;tizen40;netstandard2.0;net6.0;net7.0;net7.0-android;net7.0-ios;net7.0-tvos;net7.0-macos;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472;net6.0-windows;net6.0-windows10.0.17763;net7.0-windows;net7.0-windows10.0.17763</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
22 changes: 8 additions & 14 deletions src/ReactiveUI.Validation/States/ValidationState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ namespace ReactiveUI.Validation.States;
/// <summary>
/// Represents the validation state of a validation component.
/// </summary>
public class ValidationState : IValidationState
/// <remarks>
/// Initializes a new instance of the <see cref="ValidationState"/> class.
/// </remarks>
/// <param name="isValid">Determines if the property is valid or not.</param>
/// <param name="text">Validation text.</param>
public class ValidationState(bool isValid, IValidationText text) : IValidationState
{
/// <summary>
/// Indicates a valid state.
Expand All @@ -28,24 +33,13 @@ public ValidationState(bool isValid, string text)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ValidationState"/> class.
/// </summary>
/// <param name="isValid">Determines if the property is valid or not.</param>
/// <param name="text">Validation text.</param>
public ValidationState(bool isValid, IValidationText text)
{
IsValid = isValid;
Text = text ?? throw new ArgumentNullException(nameof(text));
}

/// <summary>
/// Gets a value indicating whether the validation is currently valid or not.
/// </summary>
public bool IsValid { get; }
public bool IsValid { get; } = isValid;

/// <summary>
/// Gets the validation text.
/// </summary>
public IValidationText Text { get; }
public IValidationText Text { get; } = text ?? throw new ArgumentNullException(nameof(text));
}
2 changes: 1 addition & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0",
"version": "7.0.400",
"rollForward": "latestMinor",
"allowPrerelease": true
},
Expand Down

0 comments on commit 0c45daf

Please sign in to comment.