save
parent
77c4ac51cb
commit
f13db85eb2
|
@ -1,16 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.53" />
|
||||
<PackageReference Include="System.Text.Json" Version="7.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.54" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,169 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{F9EB13D4-8FD9-4095-B934-F7EC681E6901}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LANCommander.PlaynitePlugin</RootNamespace>
|
||||
<AssemblyName>LANCommander.PlaynitePlugin</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\Games\Playnite\Extensions\LANCommander\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BeaconLib, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\rix0rrr.BeaconLib.1.0.2\lib\net40\BeaconLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ByteSize, Version=2.1.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ByteSize.2.1.1\lib\net45\ByteSize.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Playnite.SDK, Version=6.10.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PlayniteSDK.6.10.0\lib\net462\Playnite.SDK.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpCompress, Version=0.34.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpCompress.0.34.2\lib\net462\SharpCompress.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PowerShellStandard.Library.5.1.1\lib\net452\System.Management.Automation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encoding.CodePages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encoding.CodePages.8.0.0\lib\net462\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.8.0.0\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="YamlDotNet, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\YamlDotNet.5.4.0\lib\net45\YamlDotNet.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ZstdSharp, Version=0.7.2.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ZstdSharp.Port.0.7.2\lib\net461\ZstdSharp.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Extensions\MultiplayerInfoExtensions.cs" />
|
||||
<Compile Include="PlayniteLogger.cs" />
|
||||
<Compile Include="SaveController.cs" />
|
||||
<Compile Include="UninstallController.cs" />
|
||||
<Compile Include="InstallController.cs" />
|
||||
<Compile Include="LANCommanderLibraryPlugin.cs" />
|
||||
<Compile Include="ViewModels\LANCommanderSettingsViewModel.cs" />
|
||||
<Compile Include="Views\LANCommanderSettingsView.xaml.cs">
|
||||
<DependentUpon>Views\LANCommanderSettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ViewModels\Authentication.cs" />
|
||||
<Compile Include="Views\Authentication.xaml.cs">
|
||||
<DependentUpon>Authentication.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="app.config" />
|
||||
<Content Include="extension.yaml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Localization\en_US.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\LANCommanderSettingsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\Authentication.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.PowerShell\LANCommander.PowerShell.csproj">
|
||||
<Project>{807943bf-0c7d-4ed3-8393-cfee64e3138c}</Project>
|
||||
<Name>LANCommander.PowerShell</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj">
|
||||
<Project>{4c2a71fd-a30b-4d62-888a-4ef843d8e506}</Project>
|
||||
<Name>LANCommander.SDK</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<OutputType>Library</OutputType>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>..\..\..\..\Games\Playnite\Extensions\LANCommander\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="extension.yaml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.PowerShell\LANCommander.PowerShell.csproj" />
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SystemWebAdapters" Version="1.3.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ByteSize" Version="2.1.1" />
|
||||
<PackageReference Include="NuGet.CommandLine" Version="6.8.0" />
|
||||
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" />
|
||||
<PackageReference Include="RestSharp" Version="110.2.0" />
|
||||
<PackageReference Include="rix0rrr.BeaconLib" Version="1.0.2" />
|
||||
<PackageReference Include="SharpCompress" Version="0.34.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.7.1" />
|
||||
<PackageReference Include="ZstdSharp.Port" Version="0.7.4" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LANCommander.PlaynitePlugin")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LANCommander.PlaynitePlugin")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f9eb13d4-8fd9-4095-b934-f7ec681e6901")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -2,6 +2,7 @@
|
|||
using Playnite.SDK;
|
||||
using Playnite.SDK.Models;
|
||||
using Playnite.SDK.Plugins;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace LANCommander.PlaynitePlugin
|
||||
{
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ByteSize" version="2.1.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" targetFramework="net462" />
|
||||
<package id="NuGet.CommandLine" version="6.8.0" targetFramework="net462" developmentDependency="true" />
|
||||
<package id="PlayniteSDK" version="6.10.0" targetFramework="net462" />
|
||||
<package id="PowerShellStandard.Library" version="5.1.1" targetFramework="net462" />
|
||||
<package id="RestSharp" version="106.15.0" targetFramework="net462" />
|
||||
<package id="rix0rrr.BeaconLib" version="1.0.2" targetFramework="net462" />
|
||||
<package id="SharpCompress" version="0.34.2" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encoding.CodePages" version="8.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Json" version="8.0.0" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
<package id="YamlDotNet" version="5.4.0" targetFramework="net462" />
|
||||
<package id="ZstdSharp.Port" version="0.7.2" targetFramework="net462" />
|
||||
</packages>
|
|
@ -1,115 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D7069A13-F0AA-4CBF-9013-4276F130A6DD}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LANCommander.PowerShell.Tests</RootNamespace>
|
||||
<AssemblyName>LANCommander.PowerShell.Tests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
|
||||
<IsCodedUITest>False</IsCodedUITest>
|
||||
<TestProjectType>UnitTest</TestProjectType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpCompress, Version=0.34.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpCompress.0.34.2\lib\net462\SharpCompress.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encoding.CodePages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encoding.CodePages.8.0.0\lib\net462\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="YamlDotNet, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\YamlDotNet.5.4.0\lib\net45\YamlDotNet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ZstdSharp, Version=0.7.4.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ZstdSharp.Port.0.7.4\lib\net462\ZstdSharp.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Cmdlets.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.PowerShell\LANCommander.PowerShell.csproj">
|
||||
<Project>{807943bf-0c7d-4ed3-8393-cfee64e3138c}</Project>
|
||||
<Name>LANCommander.PowerShell</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj">
|
||||
<Project>{4c2a71fd-a30b-4d62-888a-4ef843d8e506}</Project>
|
||||
<Name>LANCommander.SDK</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<AssemblyTitle>LANCommander.PowerShell.Tests</AssemblyTitle>
|
||||
<Product>LANCommander.PowerShell.Tests</Product>
|
||||
<Copyright>Copyright © 2023</Copyright>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.PowerShell\LANCommander.PowerShell.csproj" />
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.*" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
|
||||
<PackageReference Include="RestSharp" Version="106.15.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.34.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="5.4.0" />
|
||||
<PackageReference Include="ZstdSharp.Port" Version="0.7.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SystemWebAdapters" Version="1.3.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,20 +1,9 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("LANCommander.PowerShell.Tests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LANCommander.PowerShell.Tests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("d7069a13-f0aa-4cbf-9013-4276f130a6dd")]
|
||||
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net462" />
|
||||
<package id="MSTest.TestAdapter" version="2.2.10" targetFramework="net462" />
|
||||
<package id="MSTest.TestFramework" version="2.2.10" targetFramework="net462" />
|
||||
<package id="RestSharp" version="106.15.0" targetFramework="net462" />
|
||||
<package id="SharpCompress" version="0.34.2" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encoding.CodePages" version="8.0.0" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||
<package id="YamlDotNet" version="5.4.0" targetFramework="net462" />
|
||||
<package id="ZstdSharp.Port" version="0.7.4" targetFramework="net462" />
|
||||
</packages>
|
|
@ -1,75 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{807943BF-0C7D-4ED3-8393-CFEE64E3138C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LANCommander.PowerShell</RootNamespace>
|
||||
<AssemblyName>LANCommander.PowerShell</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PowerShellStandard.Library.5.1.1\lib\net452\System.Management.Automation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Cmdlets\ConvertTo-SerializedBase64.cs" />
|
||||
<Compile Include="Cmdlets\ConvertFrom-SerializedBase64.cs" />
|
||||
<Compile Include="Cmdlets\Edit-PatchBinary.cs" />
|
||||
<Compile Include="Cmdlets\Uninstall-Game.cs" />
|
||||
<Compile Include="Cmdlets\Install-Game.cs" />
|
||||
<Compile Include="Cmdlets\Write-ReplaceContentInFile.cs" />
|
||||
<Compile Include="Cmdlets\ConvertTo-StringBytes.cs" />
|
||||
<Compile Include="Cmdlets\Get-PrimaryDisplay.cs" />
|
||||
<Compile Include="Cmdlets\Convert-AspectRatio.cs" />
|
||||
<Compile Include="Cmdlets\Get-GameManifest.cs" />
|
||||
<Compile Include="Cmdlets\Write-GameManifest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LANCommander.PowerShell.psd1">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj">
|
||||
<Project>{4c2a71fd-a30b-4d62-888a-4ef843d8e506}</Project>
|
||||
<Name>LANCommander.SDK</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<OutputType>Library</OutputType>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Update="LANCommander.PowerShell.psd1">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" />
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LANCommander.PowerShell")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LANCommander.PowerShell")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("807943bf-0c7d-4ed3-8393-cfee64e3138c")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="PowerShellStandard.Library" version="5.1.1" targetFramework="net472" />
|
||||
</packages>
|
|
@ -48,7 +48,7 @@ namespace LANCommander.SDK
|
|||
|
||||
var response = ApiClient.Post<T>(request);
|
||||
|
||||
return response.Data;
|
||||
return response;
|
||||
}
|
||||
|
||||
private T PostRequest<T>(string route)
|
||||
|
@ -58,7 +58,7 @@ namespace LANCommander.SDK
|
|||
|
||||
var response = ApiClient.Post<T>(request);
|
||||
|
||||
return response.Data;
|
||||
return response;
|
||||
}
|
||||
|
||||
private T GetRequest<T>(string route)
|
||||
|
@ -68,7 +68,7 @@ namespace LANCommander.SDK
|
|||
|
||||
var response = ApiClient.Get<T>(request);
|
||||
|
||||
return response.Data;
|
||||
return response;
|
||||
}
|
||||
|
||||
private string DownloadRequest(string route, Action<DownloadProgressChangedEventArgs> progressHandler, Action<AsyncCompletedEventArgs> completeHandler)
|
||||
|
@ -82,7 +82,7 @@ namespace LANCommander.SDK
|
|||
client.DownloadProgressChanged += (s, e) => progressHandler(e);
|
||||
client.DownloadFileCompleted += (s, e) => completeHandler(e);
|
||||
|
||||
client.DownloadFileAsync(new Uri($"{ApiClient.BaseUrl}{route}"), tempFile);
|
||||
client.DownloadFileAsync(new Uri($"{ApiClient.Options.BaseUrl}{route}"), tempFile);
|
||||
|
||||
return tempFile;
|
||||
}
|
||||
|
@ -96,18 +96,20 @@ namespace LANCommander.SDK
|
|||
|
||||
client.Headers.Add("Authorization", $"Bearer {Token.AccessToken}");
|
||||
|
||||
var ws = client.OpenRead(new Uri($"{ApiClient.BaseUrl}{route}"));
|
||||
var ws = client.OpenRead(new Uri($"{ApiClient.Options.BaseUrl}{route}"));
|
||||
|
||||
return new TrackableStream(ws, true, Convert.ToInt64(client.ResponseHeaders["Content-Length"]));
|
||||
}
|
||||
|
||||
public async Task<AuthToken> AuthenticateAsync(string username, string password)
|
||||
{
|
||||
var response = await ApiClient.ExecuteAsync<AuthResponse>(new RestRequest("/api/Auth", Method.POST).AddJsonBody(new AuthRequest()
|
||||
{
|
||||
UserName = username,
|
||||
Password = password
|
||||
}));
|
||||
|
||||
var response = await ApiClient.ExecutePostAsync<AuthResponse>(new RestRequest("/api/Auth").AddJsonBody(
|
||||
new AuthRequest()
|
||||
{
|
||||
UserName = username,
|
||||
Password = password
|
||||
}));
|
||||
|
||||
switch (response.StatusCode)
|
||||
{
|
||||
|
@ -133,7 +135,7 @@ namespace LANCommander.SDK
|
|||
|
||||
public async Task<AuthToken> RegisterAsync(string username, string password)
|
||||
{
|
||||
var response = await ApiClient.ExecuteAsync<AuthResponse>(new RestRequest("/api/auth/register", Method.POST).AddJsonBody(new AuthRequest()
|
||||
var response = await ApiClient.ExecutePostAsync<AuthResponse>(new RestRequest("/api/auth/register").AddJsonBody(new AuthRequest()
|
||||
{
|
||||
UserName = username,
|
||||
Password = password
|
||||
|
@ -163,7 +165,7 @@ namespace LANCommander.SDK
|
|||
|
||||
public async Task<bool> PingAsync()
|
||||
{
|
||||
var response = await ApiClient.ExecuteAsync(new RestRequest("/api/Ping", Method.GET));
|
||||
var response = await ApiClient.ExecuteGetAsync(new RestRequest("/api/Ping"));
|
||||
|
||||
return response.StatusCode == HttpStatusCode.OK;
|
||||
}
|
||||
|
@ -177,14 +179,11 @@ namespace LANCommander.SDK
|
|||
|
||||
var response = ApiClient.Post<AuthResponse>(request);
|
||||
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
throw new WebException(response.ErrorMessage);
|
||||
|
||||
Token = new AuthToken
|
||||
{
|
||||
AccessToken = response.Data.AccessToken,
|
||||
RefreshToken = response.Data.RefreshToken,
|
||||
Expiration = response.Data.Expiration
|
||||
AccessToken = response.AccessToken,
|
||||
RefreshToken = response.RefreshToken,
|
||||
Expiration = response.Expiration
|
||||
};
|
||||
|
||||
return Token;
|
||||
|
@ -286,19 +285,19 @@ namespace LANCommander.SDK
|
|||
{
|
||||
Logger?.LogTrace("Uploading save...");
|
||||
|
||||
var request = new RestRequest($"/api/Saves/Upload/{gameId}", Method.POST)
|
||||
var request = new RestRequest($"/api/Saves/Upload/{gameId}", Method.Post)
|
||||
.AddHeader("Authorization", $"Bearer {Token.AccessToken}");
|
||||
|
||||
request.AddFile(gameId, data, gameId);
|
||||
|
||||
var response = ApiClient.Post<GameSave>(request);
|
||||
|
||||
return response.Data;
|
||||
return response;
|
||||
}
|
||||
|
||||
public string GetMediaUrl(Media media)
|
||||
{
|
||||
return (new Uri(ApiClient.BaseUrl, $"/api/Media/{media.Id}/Download?fileId={media.FileId}").ToString());
|
||||
return (new Uri(ApiClient.Options.BaseUrl, $"/api/Media/{media.Id}/Download?fileId={media.FileId}").ToString());
|
||||
}
|
||||
|
||||
public string GetKey(Guid id)
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" />
|
||||
<PackageReference Include="RestSharp" Version="106.15.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.34.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="5.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" />
|
||||
<PackageReference Include="RestSharp" Version="110.2.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.34.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.7.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
110
LANCommander.sln
110
LANCommander.sln
|
@ -1,55 +1,55 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32328.378
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander", "LANCommander\LANCommander.csproj", "{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LANCommander.PlaynitePlugin", "LANCommander.Playnite.Extension\LANCommander.PlaynitePlugin.csproj", "{F9EB13D4-8FD9-4095-B934-F7EC681E6901}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander.SDK", "LANCommander.SDK\LANCommander.SDK.csproj", "{4C2A71FD-A30B-4D62-888A-4EF843D8E506}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander.PCGamingWiki", "LANCommander.PCGamingWiki\LANCommander.PCGamingWiki.csproj", "{2436B817-4475-4E70-9BB2-E1E7866DB79F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LANCommander.PowerShell", "LANCommander.PowerShell\LANCommander.PowerShell.csproj", "{807943BF-0C7D-4ED3-8393-CFEE64E3138C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LANCommander.PowerShell.Tests", "LANCommander.PowerShell.Tests\LANCommander.PowerShell.Tests.csproj", "{D7069A13-F0AA-4CBF-9013-4276F130A6DD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CBA5868D-8784-40B3-8E3D-46C24FDDC425}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32328.378
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander", "LANCommander\LANCommander.csproj", "{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander.PlaynitePlugin", "LANCommander.Playnite.Extension\LANCommander.PlaynitePlugin.csproj", "{F9EB13D4-8FD9-4095-B934-F7EC681E6901}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander.SDK", "LANCommander.SDK\LANCommander.SDK.csproj", "{4C2A71FD-A30B-4D62-888A-4EF843D8E506}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander.PCGamingWiki", "LANCommander.PCGamingWiki\LANCommander.PCGamingWiki.csproj", "{2436B817-4475-4E70-9BB2-E1E7866DB79F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander.PowerShell", "LANCommander.PowerShell\LANCommander.PowerShell.csproj", "{807943BF-0C7D-4ED3-8393-CFEE64E3138C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LANCommander.PowerShell.Tests", "LANCommander.PowerShell.Tests\LANCommander.PowerShell.Tests.csproj", "{D7069A13-F0AA-4CBF-9013-4276F130A6DD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C64D17A8-CDB3-4D1E-858F-6CF05B6FED4D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F9EB13D4-8FD9-4095-B934-F7EC681E6901}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4C2A71FD-A30B-4D62-888A-4EF843D8E506}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2436B817-4475-4E70-9BB2-E1E7866DB79F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{807943BF-0C7D-4ED3-8393-CFEE64E3138C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D7069A13-F0AA-4CBF-9013-4276F130A6DD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CBA5868D-8784-40B3-8E3D-46C24FDDC425}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -126,7 +126,6 @@
|
|||
Loading="Entries == null"
|
||||
OnRow="OnRow"
|
||||
SelectedRowsChanged="SelectedChanged"
|
||||
RowSelectable="EntrySelectable"
|
||||
Size="@TableSize.Small">
|
||||
<Selection Key="@context.Path" Type="@(SelectMultiple ? "checkbox" : "radio")" Disabled="!EntrySelectable.Invoke(context)" Class="@(EntrySelectable.Invoke(context) ? "" : "file-manager-selector-hidden")" />
|
||||
<Column TData="string" Width="32">
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace LANCommander.Controllers
|
|||
|
||||
var relativePath = path.Substring(httpPath.Path.TrimStart('/').Length).Replace('/', Path.DirectorySeparatorChar).TrimStart('\\');
|
||||
|
||||
var localPath = Path.Combine(httpPath.LocalPath, relativePath).TrimEnd('\\');
|
||||
var localPath = Path.Combine(httpPath.LocalPath, relativePath).TrimEnd(Path.DirectorySeparatorChar);
|
||||
var attrs = System.IO.File.GetAttributes(localPath);
|
||||
|
||||
if ((attrs & FileAttributes.Directory) == FileAttributes.Directory)
|
||||
|
|
|
@ -22,17 +22,17 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntDesign" Version="0.16.1" />
|
||||
<PackageReference Include="AntDesign.Charts" Version="0.3.2" />
|
||||
<PackageReference Include="Blazor-ApexCharts" Version="1.0.1" />
|
||||
<PackageReference Include="AntDesign" Version="0.16.3" />
|
||||
<PackageReference Include="AntDesign.Charts" Version="0.4.0" />
|
||||
<PackageReference Include="Blazor-ApexCharts" Version="2.1.0" />
|
||||
<PackageReference Include="BlazorMonaco" Version="3.1.0" />
|
||||
<PackageReference Include="ByteSize" Version="2.1.1" />
|
||||
<PackageReference Include="CoreRCON" Version="5.0.5" />
|
||||
<PackageReference Include="CoreRCON" Version="5.2.1" />
|
||||
<PackageReference Include="craftersmine.SteamGridDB.Net" Version="1.1.5" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.6" />
|
||||
<PackageReference Include="Hangfire.Core" Version="1.8.6" />
|
||||
<PackageReference Include="Hangfire.InMemory" Version="0.6.0" />
|
||||
<PackageReference Include="IGDB" Version="2.3.2" />
|
||||
<PackageReference Include="IGDB" Version="3.0.0" />
|
||||
<PackageReference Include="IPXRelayDotNet" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" />
|
||||
|
@ -45,13 +45,13 @@
|
|||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.2.2">
|
||||
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.3.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0" />
|
||||
<PackageReference Include="NLog" Version="5.2.5" />
|
||||
<PackageReference Include="NLog" Version="5.2.7" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.5" />
|
||||
<PackageReference Include="RegParserDotNet" Version="1.0.4" />
|
||||
<PackageReference Include="rix0rrr.BeaconLib" Version="1.0.2" />
|
||||
|
@ -59,7 +59,7 @@
|
|||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.0" />
|
||||
<PackageReference Include="XtermBlazor" Version="1.10.0" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.3.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.7.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
@using System.Diagnostics;
|
||||
@using LANCommander.Extensions;
|
||||
@using AntDesign.Charts;
|
||||
@using System.Collections.Concurrent;
|
||||
|
||||
<Spin Spinning="Loading">
|
||||
<Area @ref="Chart" Config="Config" />
|
||||
</Spin>
|
||||
|
||||
@code {
|
||||
[Parameter] public int TimerHistory { get; set; }
|
||||
[Parameter] public int TimerInterval { get; set; }
|
||||
|
||||
IChartComponent? Chart;
|
||||
System.Timers.Timer Timer;
|
||||
bool Loading = true;
|
||||
|
||||
Dictionary<string, double[]> Data = new Dictionary<string, double[]>();
|
||||
|
||||
ConcurrentDictionary<string, PerformanceCounter> PerformanceCounters = new ConcurrentDictionary<string, PerformanceCounter>();
|
||||
|
||||
string JsConfig = @"{
|
||||
meta: {
|
||||
value: {
|
||||
alias: 'Speed',
|
||||
formatter: (v) => humanFileSize(v, true) + '/s'
|
||||
}
|
||||
}
|
||||
}";
|
||||
|
||||
AreaConfig Config = new AreaConfig
|
||||
{
|
||||
Name = "Network Download Rate",
|
||||
Padding = "auto",
|
||||
SeriesField = "series",
|
||||
YField = "value",
|
||||
XField = "index",
|
||||
Animation = false,
|
||||
XAxis = new ValueCatTimeAxis
|
||||
{
|
||||
Visible = false
|
||||
}
|
||||
};
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (Timer == null)
|
||||
{
|
||||
Timer = new System.Timers.Timer();
|
||||
|
||||
Timer.Interval = TimerInterval;
|
||||
|
||||
Timer.Elapsed += async (s, e) =>
|
||||
{
|
||||
await RefreshData();
|
||||
};
|
||||
}
|
||||
|
||||
await Chart.UpdateChart(Config, null, null, JsConfig);
|
||||
|
||||
Timer.Start();
|
||||
|
||||
Loading = false;
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task RefreshData()
|
||||
{
|
||||
#if WINDOWS
|
||||
var category = new PerformanceCounterCategory("Network Interface");
|
||||
|
||||
foreach (var instance in category.GetInstanceNames())
|
||||
{
|
||||
if (!Data.ContainsKey(instance))
|
||||
Data[instance] = new double[TimerHistory];
|
||||
|
||||
if (!PerformanceCounters.ContainsKey(instance))
|
||||
PerformanceCounters[instance] = new PerformanceCounter("Network Interface", "Bytes Received/sec", instance);
|
||||
|
||||
Data[instance] = Data[instance].ShiftArrayAndInsert((double)PerformanceCounters[instance].NextValue(), TimerHistory);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await Chart.ChangeData(Data.SelectMany(x => x.Value.Select((y, i) => new { value = y, index = i, series = x.Key })), true);
|
||||
}
|
||||
catch { }
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
@using System.Diagnostics;
|
||||
@using LANCommander.Extensions;
|
||||
@using AntDesign.Charts;
|
||||
@using System.Collections.Concurrent;
|
||||
|
||||
<Spin Spinning="Loading">
|
||||
<Area @ref="Chart" Config="Config" />
|
||||
</Spin>
|
||||
|
||||
@code {
|
||||
[Parameter] public int TimerHistory { get; set; }
|
||||
[Parameter] public int TimerInterval { get; set; }
|
||||
|
||||
IChartComponent? Chart;
|
||||
System.Timers.Timer Timer;
|
||||
bool Loading = true;
|
||||
|
||||
Dictionary<string, double[]> Data = new Dictionary<string, double[]>();
|
||||
|
||||
ConcurrentDictionary<string, PerformanceCounter> PerformanceCounters = new ConcurrentDictionary<string, PerformanceCounter>();
|
||||
|
||||
string JsConfig = @"{
|
||||
meta: {
|
||||
value: {
|
||||
alias: 'Speed',
|
||||
formatter: (v) => humanFileSize(v, true) + '/s'
|
||||
}
|
||||
}
|
||||
}";
|
||||
|
||||
AreaConfig Config = new AreaConfig
|
||||
{
|
||||
Name = "Network Upload Rate",
|
||||
Padding = "auto",
|
||||
SeriesField = "series",
|
||||
YField = "value",
|
||||
XField = "index",
|
||||
Animation = false,
|
||||
XAxis = new ValueCatTimeAxis
|
||||
{
|
||||
Visible = false
|
||||
}
|
||||
};
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (Timer == null)
|
||||
{
|
||||
Timer = new System.Timers.Timer();
|
||||
|
||||
Timer.Interval = TimerInterval;
|
||||
|
||||
Timer.Elapsed += async (s, e) =>
|
||||
{
|
||||
await RefreshData();
|
||||
};
|
||||
}
|
||||
|
||||
await Chart.UpdateChart(Config, null, null, JsConfig);
|
||||
Timer.Start();
|
||||
|
||||
Loading = false;
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task RefreshData()
|
||||
{
|
||||
#if WINDOWS
|
||||
var category = new PerformanceCounterCategory("Network Interface");
|
||||
|
||||
foreach (var instance in category.GetInstanceNames())
|
||||
{
|
||||
if (!Data.ContainsKey(instance))
|
||||
Data[instance] = new double[TimerHistory];
|
||||
|
||||
if (!PerformanceCounters.ContainsKey(instance))
|
||||
PerformanceCounters[instance] = new PerformanceCounter("Network Interface", "Bytes Sent/sec", instance);
|
||||
|
||||
Data[instance] = Data[instance].ShiftArrayAndInsert((double)PerformanceCounters[instance].NextValue(), TimerHistory);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await Chart.ChangeData(Data.SelectMany(x => x.Value.Select((y, i) => new { value = y, index = i, series = x.Key })), true);
|
||||
}
|
||||
catch { }
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
@using System.Diagnostics;
|
||||
@using LANCommander.Extensions;
|
||||
@using AntDesign.Charts;
|
||||
|
||||
<Spin Spinning="Loading">
|
||||
<Area @ref="Chart" Config="Config" />
|
||||
</Spin>
|
||||
|
||||
@code {
|
||||
[Parameter] public int TimerHistory { get; set; }
|
||||
[Parameter] public int TimerInterval { get; set; }
|
||||
IChartComponent? Chart;
|
||||
System.Timers.Timer Timer;
|
||||
bool Loading = true;
|
||||
|
||||
double[] Data;
|
||||
|
||||
PerformanceCounter PerformanceCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
|
||||
|
||||
string JsConfig = @"{
|
||||
meta: {
|
||||
value: {
|
||||
alias: '% Usage',
|
||||
formatter: (v) => v + '%'
|
||||
}
|
||||
}
|
||||
}";
|
||||
|
||||
AreaConfig Config = new AreaConfig
|
||||
{
|
||||
Name = "Processor Utilization",
|
||||
Padding = "auto",
|
||||
YField = "value",
|
||||
XField = "index",
|
||||
Animation = false,
|
||||
IsPercent = true,
|
||||
YAxis = new ValueAxis
|
||||
{
|
||||
Min = 0,
|
||||
Max = 100
|
||||
},
|
||||
XAxis = new ValueCatTimeAxis
|
||||
{
|
||||
Visible = false
|
||||
}
|
||||
};
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
if (Timer == null)
|
||||
{
|
||||
Timer = new System.Timers.Timer();
|
||||
|
||||
Timer.Interval = TimerInterval;
|
||||
|
||||
Timer.Elapsed += async (s, e) =>
|
||||
{
|
||||
await RefreshData();
|
||||
};
|
||||
}
|
||||
|
||||
await Chart.UpdateChart(Config, null, null, JsConfig);
|
||||
Timer.Start();
|
||||
|
||||
Loading = false;
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task RefreshData()
|
||||
{
|
||||
#if WINDOWS
|
||||
Data = Data.ShiftArrayAndInsert((double)Math.Ceiling(PerformanceCounter.NextValue()), TimerHistory);
|
||||
|
||||
try
|
||||
{
|
||||
await Chart.ChangeData(Data.Select((x, i) => new { value = x, index = i }), true);
|
||||
}
|
||||
catch { }
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -6,30 +6,6 @@
|
|||
<PageHeader Title="Dashboard" Style="margin-bottom: 24px" />
|
||||
|
||||
<GridRow Gutter="(16, 16)">
|
||||
<GridCol Xs="24" Md="12">
|
||||
<Card Title="Network Download Rate">
|
||||
<Body>
|
||||
<NetworkDownloadRate TimerHistory="60" TimerInterval="1000" />
|
||||
</Body>
|
||||
</Card>
|
||||
</GridCol>
|
||||
|
||||
<GridCol Xs="24" Md="12">
|
||||
<Card Title="Network Upload Rate">
|
||||
<Body>
|
||||
<NetworkUploadRate TimerHistory="60" TimerInterval="1000" />
|
||||
</Body>
|
||||
</Card>
|
||||
</GridCol>
|
||||
|
||||
<GridCol Xs="24" Md="12">
|
||||
<Card Title="CPU Usage (%)">
|
||||
<Body>
|
||||
<ProcessorUtilization TimerHistory="60" TimerInterval="1000" />
|
||||
</Body>
|
||||
</Card>
|
||||
</GridCol>
|
||||
|
||||
<GridCol Xs="24" Md="12">
|
||||
<Card Title="Storage Usage">
|
||||
<Body>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
@page "/Files"
|
||||
@using LANCommander.Components.FileManagerComponents
|
||||
@inject IHostEnvironment Env
|
||||
@attribute [Authorize(Roles = "Administrator")]
|
||||
|
||||
<FileManager WorkingDirectory="@RootPath" />
|
||||
|
||||
@code {
|
||||
string RootPath = Path.GetPathRoot(Directory.GetCurrentDirectory());
|
||||
string RootPath => Env.ContentRootPath;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
@inject ServerProcessService ServerProcessService
|
||||
@inject IMessageService MessageService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IHostEnvironment Env
|
||||
|
||||
<Layout Class="panel-layout" Style="padding: 24px 0;">
|
||||
<Sider Width="200">
|
||||
|
@ -164,7 +165,7 @@
|
|||
|
||||
IEnumerable<Game> Games = new List<Game>();
|
||||
|
||||
string RootPath = Path.GetPathRoot(Directory.GetCurrentDirectory());
|
||||
string RootPath => Env.ContentRootPath;
|
||||
|
||||
Server Server;
|
||||
Guid GameId;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
@layout SettingsLayout
|
||||
@inject SettingService SettingService
|
||||
@inject IMessageService MessageService
|
||||
@inject IHostEnvironment Env
|
||||
@attribute [Authorize(Roles = "Administrator")]
|
||||
|
||||
<PageHeader Title="Archives" />
|
||||
|
@ -27,7 +28,7 @@
|
|||
@code {
|
||||
LANCommanderSettings Settings;
|
||||
|
||||
string RootPath = Path.GetPathRoot(Directory.GetCurrentDirectory());
|
||||
string RootPath => Env.ContentRootPath;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
@layout SettingsLayout
|
||||
@inject SettingService SettingService
|
||||
@inject IMessageService MessageService
|
||||
@inject IHostEnvironment Env
|
||||
@attribute [Authorize(Roles = "Administrator")]
|
||||
|
||||
<PageHeader Title="Media" />
|
||||
|
@ -35,7 +36,7 @@
|
|||
@code {
|
||||
LANCommanderSettings Settings;
|
||||
|
||||
string RootPath = Path.GetPathRoot(Directory.GetCurrentDirectory());
|
||||
string RootPath => Env.ContentRootPath;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
@layout SettingsLayout
|
||||
@inject SettingService SettingService
|
||||
@inject IMessageService MessageService
|
||||
@inject IHostEnvironment Env
|
||||
@attribute [Authorize(Roles = "Administrator")]
|
||||
|
||||
<PageHeader Title="User Saves" />
|
||||
|
@ -27,7 +28,7 @@
|
|||
@code {
|
||||
LANCommanderSettings Settings;
|
||||
|
||||
string RootPath = Path.GetPathRoot(Directory.GetCurrentDirectory());
|
||||
string RootPath => Env.ContentRootPath;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace LANCommander.Services
|
|||
|
||||
return files.Select(f =>
|
||||
{
|
||||
var split = f.Split('\\');
|
||||
var split = f.Split(Path.DirectorySeparatorChar);
|
||||
|
||||
return new Snippet()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue