Skip to content

Commit

Permalink
v6.0.16897.0-Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Aug 12, 2022
1 parent 5e612c2 commit 604ac14
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem" Version="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem" Version="6.0.16897.0-Beta" />
</ItemGroup>
</Project>
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="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="6.0.16897.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="6.0.16897.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
</ItemGroup>
</Project>
35 changes: 19 additions & 16 deletions Windows/Common/Core/LogFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public bool DebugLoggingEnabled
private const int sourcePathWidth = 60;
private const int remoteStorageIdWidth = 20;

private const int indent = -30;

/// <summary>
/// Creates instance of this class.
/// </summary>
Expand Down Expand Up @@ -88,24 +90,24 @@ private string ConfigureLogger()
public void PrintEnvironmentDescription()
{
// Log environment description.
log.Info($"\n{"AppID:",-25} {appId}");
log.Info($"\n{"Engine version:",-25} {typeof(IEngine).Assembly.GetName().Version}");
log.Info($"\n{"OS version:",-25} {RuntimeInformation.OSDescription}");
log.Info($"\n{".NET version:",-25} {RuntimeInformation.FrameworkDescription} {IntPtr.Size * 8}bit.");
log.Info($"\n{"Package or app identity:",-25} {PackageRegistrar.IsRunningWithIdentity()}");
log.Info($"\n{"Sparse package identity:",-25} {PackageRegistrar.IsRunningWithSparsePackageIdentity()}");
log.Info($"\n{"Elevated mode:",-25} {new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)}");
log.Info($"\n{"AppID:",indent} {appId}");
log.Info($"\n{"Engine version:",indent} {typeof(IEngine).Assembly.GetName().Version}");
log.Info($"\n{"OS version:",indent} {RuntimeInformation.OSDescription}");
log.Info($"\n{".NET version:",indent} {RuntimeInformation.FrameworkDescription} {IntPtr.Size * 8}bit.");
log.Info($"\n{"Package or app identity:",indent} {PackageRegistrar.IsRunningWithIdentity()}");
log.Info($"\n{"Sparse package identity:",indent} {PackageRegistrar.IsRunningWithSparsePackageIdentity()}");
log.Info($"\n{"Elevated mode:",indent} {new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)}");

string sparsePackagePath = PackageRegistrar.GetSparsePackagePath();
if (File.Exists(sparsePackagePath))
{
log.Info($"\n{"Sparse package location:",-25} {sparsePackagePath}");
log.Info($"\n{"Sparse package location:",indent} {sparsePackagePath}");
var cert = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile(sparsePackagePath);
log.Info($"\n{"Sparse package cert:",-25} Subject: {cert.Subject}, Issued by: {cert.Issuer}");
log.Info($"\n{"Sparse package cert:", indent} Subject: {cert.Subject}, Issued by: {cert.Issuer}");
}
else
{
log.Info($"\n{"Sparse package:",-25} Not found");
log.Info($"\n{"Sparse package:", indent} Not found");
}
}

Expand All @@ -126,11 +128,12 @@ public async Task PrintEngineStartInfoAsync(EngineWindows engine)
public async Task PrintEngineDescriptionAsync(EngineWindows engine)
{
log.Info($"\n");
log.Info($"\n{"File system root:",-25} {engine.Path}");
log.Info($"\n{"Remote storage root:",-25} {remoteStorageRootPath}");
log.Info($"\n{"AutoLock:",-25} {engine.AutoLock}");
log.Info($"\n{"Outgoing sync, ms:",-25} {engine.SyncService.SyncIntervalMs}");

log.Info($"\n{"File system root:",indent} {engine.Path}");
log.Info($"\n{"Remote storage root:",indent} {remoteStorageRootPath}");
log.Info($"\n{"AutoLock:",indent} {engine.AutoLock}");
log.Info($"\n{"Outgoing sync, ms:",indent} {engine.SyncService.SyncIntervalMs}");
log.Info($"\n{"Shell extensions RPC enabled:",indent} {engine.ShellExtensionsComServerRpcEnabled}");
log.Info($"\n{"Max Transfer concurrent requests:",indent} {engine.MaxTransferConcurrentRequests}");

// Log indexing state. Sync root must be indexed.
await PrintIndexingStateAsync(engine.Path);
Expand All @@ -143,7 +146,7 @@ public async Task PrintEngineDescriptionAsync(EngineWindows engine)
private async Task PrintIndexingStateAsync(string path)
{
StorageFolder userFileSystemRootFolder = await StorageFolder.GetFolderFromPathAsync(path);
log.Info($"\n{"Indexed state:",-25} {await userFileSystemRootFolder.GetIndexedStateAsync()}");
log.Info($"\n{"Indexed state:",indent} {await userFileSystemRootFolder.GetIndexedStateAsync()}");
}

public void LogMessage(string message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="6.0.16897.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
</ItemGroup>
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="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="6.0.16897.0-Beta" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
18 changes: 14 additions & 4 deletions Windows/VirtualDrive/VirtualDrive/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ public class AppSettings : Settings
public double SyncIntervalMs { get; set; }

/// <summary>
/// Throttling max concurrent requests.
/// Throttling max of create/update/read concurrent requests.
/// </summary>
public int? MaxConcurrentRequests { get; set; }
public int? MaxTransferConcurrentRequests { get; set; }

/// <summary>
/// Throttling max of listing/move/delete concurrent requests.
/// </summary>
public int? MaxOperationsConcurrentRequests { get; set; }

/// <summary>
/// Absolute or relative path of external COM server executable.
Expand Down Expand Up @@ -137,9 +142,14 @@ public static AppSettings ReadSettings(this IConfiguration configuration)
// Load product name from entry exe file.
settings.ProductName = FileVersionInfo.GetVersionInfo(assemblyLocation).ProductName;

if (!settings.MaxConcurrentRequests.HasValue)
if (!settings.MaxTransferConcurrentRequests.HasValue)
{
settings.MaxTransferConcurrentRequests = 6;
}

if (!settings.MaxOperationsConcurrentRequests.HasValue)
{
settings.MaxConcurrentRequests = int.MaxValue;
settings.MaxOperationsConcurrentRequests = int.MaxValue;
}

return settings;
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 @@ -151,7 +151,8 @@ private static async Task RunEngine()

Engine.SyncService.SyncIntervalMs = Settings.SyncIntervalMs;
Engine.AutoLock = Settings.AutoLock;
Engine.MaxConcurrentRequests = Settings.MaxConcurrentRequests.Value;
Engine.MaxTransferConcurrentRequests = Settings.MaxTransferConcurrentRequests.Value;
Engine.MaxOperationsConcurrentRequests = Settings.MaxOperationsConcurrentRequests.Value;
Engine.ShellExtensionsComServerRpcEnabled = Settings.ShellExtensionsComServerRpcEnabled; // Enable RPC in case RPC shaell extension handlers, hosted in separate process.

// Set the remote storage item ID for the root item. It will be passed to the IEngine.GetFileSystemItemAsync()
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="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="6.0.16897.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\..\Common\VirtualDrive\Common.Windows.VirtualDrive.csproj" />
</ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions Windows/VirtualDrive/VirtualDrive/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@
"SyncIntervalMs": 10000,


// Maximum number of concurrent requests to remote storage. If null then int.Max value is used.
"MaxConcurrentRequests": null,
// Maximum number of create/update/read concurrent requests to remote storage. If null then 6 value is used.
"MaxTransferConcurrentRequests": 6,


// Maximum number of listing/delete/move concurrent requests to remote storage. If null then int.Max value is used.
"MaxOperationsConcurrentRequests": null,


// Automatically lock the file in the remote storage when a file handle is being opened for writing, unlock on close.
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="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="6.0.16897.0-Beta" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
18 changes: 14 additions & 4 deletions Windows/WebDAVDrive/WebDAVDrive/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ public class AppSettings : Settings
public double SyncIntervalMs { get; set; }

/// <summary>
/// Throttling max concurrent requests.
/// Throttling max of create/update/read concurrent requests.
/// </summary>
public int? MaxConcurrentRequests { get; set; }
public int? MaxTransferConcurrentRequests { get; set; }

/// <summary>
/// Throttling max of listing/move/delete concurrent requests.
/// </summary>
public int? MaxOperationsConcurrentRequests { get; set; }

/// <summary>
/// URL to get a thumbnail for Windows Explorer thumbnails mode.
Expand Down Expand Up @@ -117,9 +122,14 @@ public static AppSettings ReadSettings(this IConfiguration configuration)
// Load product name from entry exe file.
settings.ProductName = FileVersionInfo.GetVersionInfo(assemblyLocation).ProductName;

if (!settings.MaxConcurrentRequests.HasValue)
if (!settings.MaxTransferConcurrentRequests.HasValue)
{
settings.MaxTransferConcurrentRequests = 6;
}

if (!settings.MaxOperationsConcurrentRequests.HasValue)
{
settings.MaxConcurrentRequests = int.MaxValue;
settings.MaxOperationsConcurrentRequests = int.MaxValue;
}

return settings;
Expand Down
3 changes: 2 additions & 1 deletion Windows/WebDAVDrive/WebDAVDrive/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ private static async Task RunEngine()

Engine.SyncService.SyncIntervalMs = Settings.SyncIntervalMs;
Engine.AutoLock = Settings.AutoLock;
Engine.MaxConcurrentRequests = Settings.MaxConcurrentRequests.Value;
Engine.MaxTransferConcurrentRequests = Settings.MaxTransferConcurrentRequests.Value;
Engine.MaxOperationsConcurrentRequests = Settings.MaxOperationsConcurrentRequests.Value;
Engine.ShellExtensionsComServerRpcEnabled = Settings.ShellExtensionsComServerRpcEnabled; // Enable RPC in case RPC shaell extension handlers, hosted in separate process.

// Print console commands.
Expand Down
2 changes: 1 addition & 1 deletion Windows/WebDAVDrive/WebDAVDrive/WebDAVDrive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="6.0.16872.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="6.0.16897.0-Beta" />
<ProjectReference Include="..\..\Common\VirtualDrive\Common.Windows.VirtualDrive.csproj" />
<ProjectReference Include="..\WebDAVDrive.UI\WebDAVDrive.UI.csproj" />
</ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions Windows/WebDAVDrive/WebDAVDrive/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@
"SyncIntervalMs": 10000,


// Maximum number of concurrent requests to remote storage. If null then int.Max value is used.
"MaxConcurrentRequests": 6,
// Maximum number of create/update/read concurrent requests to remote storage. If null then 6 value is used.
"MaxTransferConcurrentRequests": 6,


// Maximum number of listing/delete/move concurrent requests to remote storage. If null then int.Max value is used.
"MaxOperationsConcurrentRequests": null,


// Automatically lock the file in remote storage when a file handle is being opened for writing, unlock on close.
Expand Down

0 comments on commit 604ac14

Please sign in to comment.