Skip to content

Commit

Permalink
v7.0.22158.0-Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed May 25, 2023
1 parent 1986f61 commit e2db0a7
Show file tree
Hide file tree
Showing 17 changed files with 127 additions and 92 deletions.
4 changes: 2 additions & 2 deletions Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22158.0-Beta" />
<PackageReference Include="ITHit.FileSystem" Version="7.0.22158.0-Beta" />
</ItemGroup>
</Project>
17 changes: 12 additions & 5 deletions Windows/Common/Core/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,25 @@ public async Task StopEngineAsync()
}

#if DEBUG

/// <summary>
/// Opens Windows File Manager with both remote storage and user file system for testing.
/// Sets console output defaults.
/// </summary>
/// <param name="openRemoteStorage">True if the Remote Storage must be opened. False - otherwise.</param>
/// <remarks>This method is provided solely for the development and testing convenience.</remarks>
public void ShowTestEnvironment(bool openRemoteStorage = true)
public void ConfigureConsole()
{
// Enable UTF8 for Console Window and set width.
Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight / 3);
Console.SetBufferSize(Console.LargestWindowWidth * 2, short.MaxValue / 2);
//Console.SetBufferSize(Console.LargestWindowWidth * 2, short.MaxValue / 2);
}

/// <summary>
/// Opens Windows File Manager with both remote storage and user file system for testing.
/// </summary>
/// <param name="openRemoteStorage">True if the Remote Storage must be opened. False - otherwise.</param>
/// <remarks>This method is provided solely for the development and testing convenience.</remarks>
public void ShowTestEnvironment(bool openRemoteStorage = true)
{
// Open Windows File Manager with user file system.
Commands.Open(Engine.Path);

Expand Down
4 changes: 2 additions & 2 deletions Windows/Common/Core/Common.Windows.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22158.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22158.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions Windows/Common/Core/Registrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ public async Task CleanupAppFoldersAsync(EngineWindows engine)

try
{
if (engine != null)
if (engine != null && !string.IsNullOrWhiteSpace(engine.DataPath))
{
await engine.UninstallCleanupAsync();
Directory.Delete(engine.DataPath, true);
}
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Compile Remove="IVirtualFolder.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22158.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Windows/Common/VirtualDrive/VirtualEngineBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public override async Task StopAsync()
/// <param name="e">Contains new and old Engine state.</param>
private void Engine_StateChanged(Engine engine, EngineWindows.StateChangeEventArgs e)
{
engine.LogMessage($"{e.NewState}");
engine.Logger.LogMessage($"{e.NewState}");
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.0.22158.0-Beta" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
3 changes: 2 additions & 1 deletion Windows/VirtualDrive/VirtualDrive/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ static async Task Main(string[] args)
Settings = new ConfigurationBuilder().AddJsonFile("appsettings.json", false, true).Build().ReadSettings();

logFormatter = new LogFormatter(log, Settings.AppID, Settings.RemoteStorageRootPath);
commands = new Commands(log, Settings.RemoteStorageRootPath);
commands.ConfigureConsole();

// Log environment description.
logFormatter.PrintEnvironmentDescription();

registrar = new SparsePackageRegistrar(SyncRootId, Settings.UserFileSystemRootPath, log, ShellExtension.ShellExtensions.Handlers);

commands = new Commands(log, Settings.RemoteStorageRootPath);
consoleProcessor = new ConsoleProcessor(registrar, logFormatter, commands);

switch (args.FirstOrDefault())
Expand Down
2 changes: 1 addition & 1 deletion Windows/VirtualDrive/VirtualDrive/VirtualDrive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This is an advanced project with ETags support, Microsoft Office documents editi
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22158.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\..\Common\VirtualDrive\Common.Windows.VirtualDrive.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Windows/VirtualDrive/VirtualDrive/VirtualFolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public async Task GetChildrenAsync(string pattern, IOperationContext operationCo
// To signal that the children enumeration is completed
// always call ReturnChildren(), even if the folder is empty.
await resultContext.ReturnChildrenAsync(remoteStorageChildren.ToArray(), totalCount);
Engine.LogDebug($"Listed {totalCount} item(s). Took: {watch.Elapsed.ToString(@"hh\:mm\:ss\.ff")}", UserFileSystemPath);
Logger.LogDebug($"Listed {totalCount} item(s). Took: {watch.Elapsed.ToString(@"hh\:mm\:ss\.ff")}", UserFileSystemPath);

// Save data that you wish to display in custom columns here.
//foreach (FileSystemItemMetadataExt itemMetadata in userFileSystemChildren)
Expand Down
3 changes: 2 additions & 1 deletion Windows/VirtualFileSystem/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ public static async Task Main(string[] args)
Settings = new ConfigurationBuilder().AddJsonFile("appsettings.json", false, true).Build().ReadSettings();

logFormatter = new LogFormatter(log, Settings.AppID, Settings.RemoteStorageRootPath);
commands = new Commands(log, Settings.RemoteStorageRootPath);
commands.ConfigureConsole();

// Log environment description.
logFormatter.PrintEnvironmentDescription();

registrar = new Registrar(SyncRootId, Settings.UserFileSystemRootPath, log);

commands = new Commands(log, Settings.RemoteStorageRootPath);
consoleProcessor = new ConsoleProcessor(registrar, logFormatter, commands);

try
Expand Down
2 changes: 1 addition & 1 deletion Windows/VirtualFileSystem/VirtualEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public override async Task StopAsync()
/// <param name="e">Contains new and old Engine state.</param>
private void Engine_StateChanged(Engine engine, EngineWindows.StateChangeEventArgs e)
{
engine.LogMessage($"{e.NewState}");
engine.Logger.LogMessage($"{e.NewState}");
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Copyright>IT HIT LTD.</Copyright>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.0.22106.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.0.22158.0-Beta" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
9 changes: 4 additions & 5 deletions Windows/WebDAVDrive/WebDAVDrive/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

using ITHit.WebDAV.Client;
using ITHit.WebDAV.Client.Exceptions;
using System.Net.Http;

using WebDAVDrive.UI;
using WebDAVDrive.UI.ViewModels;
using ITHit.FileSystem.Windows;
using Windows.Media.Protection.PlayReady;


namespace WebDAVDrive
{
Expand Down Expand Up @@ -98,13 +96,14 @@ static async Task Main(string[] args)
Settings = new ConfigurationBuilder().AddJsonFile("appsettings.json", false, true).Build().ReadSettings();

logFormatter = new LogFormatter(log, Settings.AppID, Settings.WebDAVServerUrl);
commands = new Commands(log, Settings.WebDAVServerUrl);
commands.ConfigureConsole();

// Log environment description.
logFormatter.PrintEnvironmentDescription();

registrar = new SparsePackageRegistrar(SyncRootId, Settings.UserFileSystemRootPath, log, ShellExtension.ShellExtensions.Handlers);

commands = new Commands(log, Settings.WebDAVServerUrl);
consoleProcessor = new ConsoleProcessor(registrar, logFormatter, commands);

switch (args.FirstOrDefault())
Expand Down Expand Up @@ -240,7 +239,7 @@ private static async Task StartConsoleReadKeyAsync()
/// <param name="engineInstanceId">Engine instance ID to be sent with every request to the remote storage.</param>
private static WebDavSession CreateWebDavSession(Guid engineInstanceId)
{
HttpClientHandler handler = new HttpClientHandler()
System.Net.Http.HttpClientHandler handler = new System.Net.Http.HttpClientHandler()
{
AllowAutoRedirect = false,

Expand Down
Loading

0 comments on commit e2db0a7

Please sign in to comment.