Skip to content

Commit

Permalink
v4.2.12691.0-Beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Mar 22, 2022
1 parent 0da32b8 commit 4b7e4af
Show file tree
Hide file tree
Showing 59 changed files with 661 additions and 88 deletions.
2 changes: 1 addition & 1 deletion Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<RootNamespace>ITHit.FileSystem.Samples.Common</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem" Version="4.1.12172.0-Beta2" />
<PackageReference Include="ITHit.FileSystem" Version="4.2.12691.0-Beta2" />
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions Common/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,10 @@ public class Settings
/// Communication channel name is used by RPC to establish connection over named pipes.
/// </summary>
public string RpcCommunicationChannelName { get; set; }

/// <summary>
/// Gets or sets the maximum number of concurrent tasks
/// </summary>
public int MaxDegreeOfParallelism { get; set; }
}
}
2 changes: 1 addition & 1 deletion Windows/Common/Core/Common.Windows.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.1.12172.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.2.12691.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.1.12172.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.2.12691.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\Rpc.Proto\Common.Windows.Rpc.Proto.csproj" />
<ProjectReference Include="..\Rpc\Common.Windows.Rpc.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Compile Remove="ETagManager.cs" />
<Compile Remove="ExternalDataManager.cs" />
<Compile Remove="FilteredDocsMonitor.cs" />
<Compile Remove="FullSync\ClientToServerSync.cs" />
<Compile Remove="FullSync\ServerToClientSync.cs" />
<Compile Remove="IMapping.cs" />
<Compile Remove="LockManager.cs" />
Expand All @@ -22,7 +23,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.1.12172.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.2.12691.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
<ProjectReference Include="..\Rpc.Proto\Common.Windows.Rpc.Proto.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion Windows/Common/VirtualDrive/FullSync/FullSyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private async void Timer_ElapsedAsync(object sender, System.Timers.ElapsedEventA
InvokeSyncEvent(SynchronizationState.Synchronizing);

// UFS -> RS. Recursivery synchronize all updated/created file and folders present in the user file system.
await new ClientToServerSync(engine, Log).SyncronizeFolderAsync(userFileSystemRootPath);
//await new ClientToServerSync(engine, Log).SyncronizeFolderAsync(userFileSystemRootPath);

// UFS <- RS. Recursivery synchronize all updated/created/deleted file and folders present in the user file system.
//await new ServerToClientSync(engine, Log).SyncronizeFolderAsync(userFileSystemRootPath);
Expand Down
4 changes: 2 additions & 2 deletions Windows/Common/VirtualDrive/Rpc/GprcServerServiceImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override async Task<EmptyMessage> SetLockStatus(ItemsStatusList request,
string filePath = pair.Key;
bool fileStatus = pair.Value;

IClientNotificationsWindows clientNotifications = engine.ClientNotifications(filePath);
IClientNotifications clientNotifications = engine.ClientNotifications(filePath);
if (fileStatus)
await clientNotifications.LockAsync();
else
Expand Down Expand Up @@ -71,7 +71,7 @@ public override async Task<ItemsStatusList> GetLockStatus(ItemsPathList request,

foreach (string filePath in request.Files)
{
IClientNotificationsWindows clientNotifications = engine.ClientNotifications(filePath);
IClientNotifications clientNotifications = engine.ClientNotifications(filePath);
LockMode lockMode = await clientNotifications.GetLockModeAsync();
bool lockStatus = lockMode != LockMode.None;

Expand Down
8 changes: 5 additions & 3 deletions Windows/Common/VirtualDrive/VirtualEngineBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public abstract class VirtualEngineBase : EngineWindows
/// <param name="iconsFolderPath">Path to the icons folder.</param>
/// <param name="rpcCommunicationChannelName">Channel name to communicate with Windows Explorer context menu and other components on this machine.</param>
/// <param name="syncIntervalMs">Full synchronization interval in milliseconds.</param>
/// <param name="maxDegreeOfParallelism">A maximum number of concurrent tasks.</param>
/// <param name="log4net">Log4net logger.</param>
public VirtualEngineBase(
string license,
Expand All @@ -61,8 +62,9 @@ public VirtualEngineBase(
string iconsFolderPath,
string rpcCommunicationChannelName,
double syncIntervalMs,
int maxDegreeOfParallelism,
ILog log4net)
: base(license, userFileSystemRootPath)
: base(license, userFileSystemRootPath, maxDegreeOfParallelism)
{
logger = new Logger("File System Engine", log4net) ?? throw new NullReferenceException(nameof(log4net));
this.iconsFolderPath = iconsFolderPath ?? throw new NullReferenceException(nameof(iconsFolderPath));
Expand Down Expand Up @@ -120,9 +122,9 @@ public override async Task<bool> FilterAsync(OperationType operationType, string
}

/// <inheritdoc/>
public override async Task StartAsync()
public override async Task StartAsync(bool processModified = true)
{
await base.StartAsync();
await base.StartAsync(processModified);
//RemoteStorageMonitor.Start();
//await SyncService.StartAsync();
grpcServer.Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ namespace CommonShellExtensionRpc
{
public sealed class CustomStateProviderProxy
{
public ItemProperty[] GetItemProperties(string itemPath)
public ItemProperty[] GetItemProperties(string itemPath, bool virtualDrivePlatform)
{
GrpcClient grpcClient = new GrpcClient("VirtualDrive.RPC");
string channelName = virtualDrivePlatform ? "VirtualDrive.RPC" : "WebDAVDrive.RPC";

GrpcClient grpcClient = new GrpcClient(channelName);

try
{

ItemPropertyRequest request = new()
{
Path = itemPath
Expand All @@ -29,7 +30,7 @@ public ItemProperty[] GetItemProperties(string itemPath)

return itemPropertyResult
.Properties
.Select(i => new ItemProperty(i.Id, i.Value, i.IconResource))
.Select(i => new ItemProperty(i.Id, ValueValidator(i.Value), i.IconResource))
.ToArray();

}
Expand All @@ -46,5 +47,10 @@ public ItemProperty[] GetItemProperties(string itemPath)
return new ItemProperty[] { };
}
}

private string ValueValidator(string val)
{
return string.IsNullOrWhiteSpace(val) ? "n/a" : val;
}
}
}
Loading

0 comments on commit 4b7e4af

Please sign in to comment.