nullable reference types

This commit is contained in:
Holger Börchers 2020-08-31 20:37:32 +02:00
parent 8cd47a0252
commit ea1f34a39c
3 changed files with 12 additions and 9 deletions

View File

@ -9,7 +9,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="FastMember" Version="1.5.0" /> <PackageReference Include="FastMember" Version="1.5.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200803.0" /> <PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200831.1" />
<PackageReference Include="Prism.DryIoc" Version="8.0.0.1850-pre" /> <PackageReference Include="Prism.DryIoc" Version="8.0.0.1850-pre" />
<PackageReference Include="Prism.Wpf" Version="8.0.0.1850-pre" /> <PackageReference Include="Prism.Wpf" Version="8.0.0.1850-pre" />
<PackageReference Include="YamlDotNet" Version="8.1.2" /> <PackageReference Include="YamlDotNet" Version="8.1.2" />

View File

@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200803.0" /> <PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200831.1" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" /> <PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup> </ItemGroup>

View File

@ -85,7 +85,7 @@ namespace Controls
/// <summary> /// <summary>
/// Command. /// Command.
/// </summary> /// </summary>
public ICommand Command public ICommand? Command
{ {
get => (ICommand)GetValue(CommandProperty); get => (ICommand)GetValue(CommandProperty);
set => SetValue(CommandProperty, value); set => SetValue(CommandProperty, value);
@ -94,7 +94,7 @@ namespace Controls
/// <summary> /// <summary>
/// Command content. /// Command content.
/// </summary> /// </summary>
public object CommandContent public object? CommandContent
{ {
get => GetValue(CommandContentProperty); get => GetValue(CommandContentProperty);
set => SetValue(CommandContentProperty, value); set => SetValue(CommandContentProperty, value);
@ -103,7 +103,7 @@ namespace Controls
/// <summary> /// <summary>
/// Command parameter. /// Command parameter.
/// </summary> /// </summary>
public object CommandParameter public object? CommandParameter
{ {
get => GetValue(CommandParameterProperty); get => GetValue(CommandParameterProperty);
set => SetValue(CommandParameterProperty, value); set => SetValue(CommandParameterProperty, value);
@ -130,7 +130,7 @@ namespace Controls
/// <summary> /// <summary>
/// Label. /// Label.
/// </summary> /// </summary>
public string Label public string? Label
{ {
get => (string)GetValue(LabelProperty); get => (string)GetValue(LabelProperty);
set => SetValue(LabelProperty, value); set => SetValue(LabelProperty, value);
@ -148,7 +148,7 @@ namespace Controls
/// <summary> /// <summary>
/// Symbol. /// Symbol.
/// </summary> /// </summary>
public object Symbol public object? Symbol
{ {
get => GetValue(SymbolProperty); get => GetValue(SymbolProperty);
set => SetValue(SymbolProperty, value); set => SetValue(SymbolProperty, value);
@ -157,7 +157,7 @@ namespace Controls
/// <summary> /// <summary>
/// Value. /// Value.
/// </summary> /// </summary>
public object Value public object? Value
{ {
get => GetValue(ValueProperty); get => GetValue(ValueProperty);
set => SetValue(ValueProperty, value); set => SetValue(ValueProperty, value);
@ -173,6 +173,9 @@ namespace Controls
} }
/// <inheritdoc /> /// <inheritdoc />
public override string ToString() => Value != null ? base.ToString() + " " + Value : base.ToString(); public override string ToString()
{
return $"{base.ToString()} {Value}";
}
} }
} }