Use nullable
This commit is contained in:
Родитель
1e04e296b8
Коммит
d7aa1ee846
|
@ -1,6 +1,6 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>0.8.2.1</VersionPrefix>
|
||||
<VersionPrefix>0.9.0</VersionPrefix>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<Authors>Wiesław Šoltés</Authors>
|
||||
<Company>Wiesław Šoltés</Company>
|
||||
|
@ -8,4 +8,7 @@
|
|||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/wieslawsoltes/SimpleWavSplitter</PackageProjectUrl>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace SimpleWavSplitter.Avalonia
|
|||
textOutput = this.FindControl<TextBox>("textOutput");
|
||||
|
||||
var version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
Title = string.Format("SimpleWavSplitter v{0}.{1}.{2}", version.Major, version.Minor, version.Build);
|
||||
Title = string.Format("SimpleWavSplitter v{0}.{1}.{2}", version?.Major, version?.Minor, version?.Build);
|
||||
|
||||
btnBrowseOutputPath.Click += async (sender, e) => await GetOutputPath();
|
||||
btnGetWavHeader.Click += async (sender, e) => await GetWavHeader();
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>False</IsPackable>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace SimpleWavSplitter.Console
|
|||
WriteLine(
|
||||
string.Format(
|
||||
"SimpleWavSplitterConsole v{0}.{1}.{2}",
|
||||
v.Major, v.Minor, v.Build));
|
||||
v?.Major, v?.Minor, v?.Build));
|
||||
Write(Environment.NewLine);
|
||||
WriteLine("Usage:");
|
||||
WriteLine("SimpleWavSplitter.Console <file.wav> [<OutputPath>]");
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>False</IsPackable>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace WavFile
|
|||
/// </summary>
|
||||
public class SimpleWavFileSplitter
|
||||
{
|
||||
private CancellationTokenSource _tokenSource;
|
||||
private CancellationTokenSource? _tokenSource;
|
||||
|
||||
/// <summary>
|
||||
/// Get WAV file header.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net461</TargetFrameworks>
|
||||
<OutputType>Library</OutputType>
|
||||
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -5,8 +5,10 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<IsPackable>False</IsPackable>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\build\Base.props" />
|
||||
<Import Project="..\..\build\XUnit.props" />
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче