Work on some warnings
This commit is contained in:
parent
6352372179
commit
eea740e502
|
|
@ -70,7 +70,7 @@ namespace Elsa.Activities.Rpa.Web.Services
|
|||
throw new PlatformNotSupportedException("Your operating system is not supported.");
|
||||
}
|
||||
|
||||
string targetPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
string targetPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;
|
||||
targetPath = Path.Combine(targetPath, driverName);
|
||||
if (!forceDownload && File.Exists(targetPath))
|
||||
{
|
||||
|
|
@ -84,7 +84,7 @@ namespace Elsa.Activities.Rpa.Web.Services
|
|||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
}
|
||||
);
|
||||
)!;
|
||||
string existingChromeDriverVersion = await process.StandardOutput.ReadToEndAsync();
|
||||
string error = await process.StandardError.ReadToEndAsync();
|
||||
process.WaitForExit();
|
||||
|
|
@ -118,7 +118,7 @@ namespace Elsa.Activities.Rpa.Web.Services
|
|||
using (var zipArchive = new ZipArchive(zipFileStream, ZipArchiveMode.Read))
|
||||
using (var chromeDriverWriter = new FileStream(targetPath, FileMode.Create))
|
||||
{
|
||||
var entry = zipArchive.GetEntry(driverName);
|
||||
var entry = zipArchive.GetEntry(driverName)!;
|
||||
using Stream chromeDriverStream = entry.Open();
|
||||
await chromeDriverStream.CopyToAsync(chromeDriverWriter);
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ namespace Elsa.Activities.Rpa.Web.Services
|
|||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
}
|
||||
);
|
||||
)!;
|
||||
string error = await process.StandardError.ReadToEndAsync();
|
||||
process.WaitForExit();
|
||||
process.Kill();
|
||||
|
|
@ -152,7 +152,7 @@ namespace Elsa.Activities.Rpa.Web.Services
|
|||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
string chromePath = (string)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe", null, null);
|
||||
var chromePath = (string?)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe", null, null);
|
||||
if (chromePath == null)
|
||||
{
|
||||
throw new Exception("Google Chrome not found in registry");
|
||||
|
|
@ -175,7 +175,7 @@ namespace Elsa.Activities.Rpa.Web.Services
|
|||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
}
|
||||
);
|
||||
)!;
|
||||
string output = await process.StandardOutput.ReadToEndAsync();
|
||||
string error = await process.StandardError.ReadToEndAsync();
|
||||
process.WaitForExit();
|
||||
|
|
@ -207,7 +207,7 @@ namespace Elsa.Activities.Rpa.Web.Services
|
|||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
}
|
||||
);
|
||||
)!;
|
||||
string output = await process.StandardOutput.ReadToEndAsync();
|
||||
string error = await process.StandardError.ReadToEndAsync();
|
||||
process.WaitForExit();
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ namespace Elsa.Services.Models
|
|||
public bool SaveWorkflowContext { get; set; }
|
||||
public IDictionary<string, string> PropertyStorageProviders { get; set; } = new Dictionary<string, string>();
|
||||
public string? Source { get; set; }
|
||||
public string Key { get; set; }
|
||||
public override string ToString() => Type;
|
||||
}
|
||||
}
|
||||
|
|
@ -7,8 +7,12 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\core\Elsa\Elsa.csproj" />
|
||||
<ProjectReference Include="..\..\..\persistence\Elsa.Persistence.YesSql\Elsa.Persistence.YesSql.csproj" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\core\Elsa\Elsa.csproj"/>
|
||||
<ProjectReference Include="..\..\..\persistence\Elsa.Persistence.YesSql\Elsa.Persistence.YesSql.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,39 +1,40 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="appsettings.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="appsettings.json"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0"/>
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Console\Elsa.Activities.Console.csproj" />
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.File\Elsa.Activities.File.csproj" />
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Temporal.Quartz\Elsa.Activities.Temporal.Quartz.csproj" />
|
||||
<ProjectReference Include="..\..\..\core\Elsa\Elsa.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Console\Elsa.Activities.Console.csproj"/>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.File\Elsa.Activities.File.csproj"/>
|
||||
<ProjectReference Include="..\..\..\activities\Elsa.Activities.Temporal.Quartz\Elsa.Activities.Temporal.Quartz.csproj"/>
|
||||
<ProjectReference Include="..\..\..\core\Elsa\Elsa.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="appsettings.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="appsettings.json"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Program.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Program.cs">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in a new issue