Skip to content

Commit

Permalink
Update framework supports the latest version.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoYang06 committed Mar 8, 2024
1 parent be0e1fc commit 461735e
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/Demos/Wif.Demo.Common/Wif.Demo.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net472;net6.0-windows;net8.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<LangVersion>default</LangVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Demos/Wif.Demo/Wif.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net462;net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net472;net6.0-windows;net8.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<LangVersion>default</LangVersion>
</PropertyGroup>
Expand Down
8 changes: 7 additions & 1 deletion Source/Wif.Core/Wif.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net472;net6.0-windows;net8.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<RootNamespace>Frontier.Wif.Core</RootNamespace>
<Version>0.3.0.21349</Version>
Expand All @@ -24,6 +24,12 @@
<OutputPath>..\Output\Release\</OutputPath>
<DocumentationFile>..\Output\Release\Wif.Core.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows|AnyCPU'">
<WarningLevel>7</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows|AnyCPU'">
<WarningLevel>7</WarningLevel>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Wif.Utilities\Wif.Utilities.csproj" />
</ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion Source/Wif.Infrastructure/Wif.Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net472;net6.0-windows;net8.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<RootNamespace>Frontier.Wif.Infrastructure</RootNamespace>
<Version>0.3.0.21349</Version>
Expand All @@ -25,6 +25,12 @@
<OutputPath>..\Output\Release\</OutputPath>
<DocumentationFile>..\Output\Release\Wif.Infrastructure.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows|AnyCPU'">
<WarningLevel>7</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows|AnyCPU'">
<WarningLevel>7</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.19" />
<PackageReference Include="WpfAnalyzers" Version="3.5.2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ public static class BinarySerializationExtensions
/// <returns></returns>
public static T Deserialize<T>(this Stream stream)
{
#pragma warning disable SYSLIB0011
var formatter = new BinaryFormatter();
stream.Position = 0;
return (T) formatter.Deserialize(stream);
#pragma warning disable SYSLIB0011
}

/// <summary>
Expand All @@ -40,10 +42,12 @@ public static T Deserialize<T>(this Stream stream)
/// <returns></returns>
public static Stream Serialize(this object source)
{
#pragma warning disable SYSLIB0011
var formatter = new BinaryFormatter();
var stream = new MemoryStream();
formatter.Serialize(stream, source);
return stream;
#pragma warning disable SYSLIB0011
}

#endregion
Expand Down
4 changes: 4 additions & 0 deletions Source/Wif.Utilities/Helpers/SerializationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public static void SerializeObjectToXmlFile(object sourceObject, string targetFi
/// <returns></returns>
private static T DeserializeFromBytes<T>(byte[] source)
{
#pragma warning disable SYSLIB0011
var obj = default(T);
IFormatter formatter = new BinaryFormatter();
T result;
Expand All @@ -198,6 +199,7 @@ private static T DeserializeFromBytes<T>(byte[] source)
}

return result;
#pragma warning disable SYSLIB0011
}

/// <summary>
Expand All @@ -208,6 +210,7 @@ private static T DeserializeFromBytes<T>(byte[] source)
/// <returns></returns>
private static byte[] SerializeToBytes<T>(T obj)
{
#pragma warning disable SYSLIB0011
IFormatter formatter = new BinaryFormatter();
byte[] result;
using (var memoryStream = new MemoryStream())
Expand All @@ -218,6 +221,7 @@ private static byte[] SerializeToBytes<T>(T obj)
}

return result;
#pragma warning disable SYSLIB0011
}

#endregion
Expand Down
20 changes: 19 additions & 1 deletion Source/Wif.Utilities/Wif.Utilities.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net472;net6.0-windows;net8.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>Frontier.Wif.Utilities</RootNamespace>
Expand All @@ -25,6 +25,24 @@
<OutputPath>..\Output\Release\</OutputPath>
<DocumentationFile>..\Output\Release\Wif.Utilities.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-windows|AnyCPU'">
<WarningLevel>6</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-windows|AnyCPU'">
<WarningLevel>6</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net472|AnyCPU'">
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net472|AnyCPU'">
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows|AnyCPU'">
<WarningLevel>7</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows|AnyCPU'">
<WarningLevel>7</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="WpfAnalyzers" Version="3.5.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
3 changes: 2 additions & 1 deletion Source/Wif.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@
<s:Int64 x:Key="/Default/Environment/SearchAndNavigation/DefaultOccurrencesGroupingIndices/=JetBrains_002EReSharper_002EFeature_002EServices_002ENavigation_002EDescriptors_002ESearchUsagesDescriptor/@EntryIndexedValue">12</s:Int64>
<s:Int64 x:Key="/Default/Environment/SearchAndNavigation/DefaultOccurrencesGroupingIndices/=JetBrains_002EReSharper_002EFeatures_002EInspections_002EAnalyzeReferences_002EAnalyzeReferencesDescriptor/@EntryIndexedValue">2</s:Int64>
<s:Int64 x:Key="/Default/Environment/SearchAndNavigation/DefaultOccurrencesGroupingIndices/=JetBrains_002EReSharper_002EFeatures_002EInspections_002EAnalyzeReferences_002ERemoveUnused_002EUnusedReferencesDescriptor/@EntryIndexedValue">0</s:Int64>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EApplication_002EExceptionReport_002EUserLoginInformationMigrateSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECpp_002ECodeStyle_002ESettingsUpgrade_002EFunctionReturnStyleSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -343,7 +344,7 @@
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=AutoStackTraceExplorerExplainer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=EditorConfigFeatureSuggester/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=GotoSuggester/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/Housekeeping/FeedbackReport/SelectedUserIdentificator/@EntryValue">anonymous</s:String>

<s:String x:Key="/Default/Housekeeping/FeedbackReport/SelfProfilingToolLocation/@EntryValue">C:\Users\leoli\AppData\Local\Temp\JetBrains\58a2b74a-22b9-439d-a5b4-772306c6323a</s:String>
<s:Boolean x:Key="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/IntellisenseHousekeeping/HintUsed/@EntryValue">True</s:Boolean>
Expand Down

0 comments on commit 461735e

Please sign in to comment.