Skip to content

Commit 35fa937

Browse files
committed
v4.3.12907.0-Beta2
1 parent 4b7e4af commit 35fa937

34 files changed

+82
-60
lines changed

Common/Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<RootNamespace>ITHit.FileSystem.Samples.Common</RootNamespace>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="ITHit.FileSystem" Version="4.2.12691.0-Beta2" />
12+
<PackageReference Include="ITHit.FileSystem" Version="4.3.12907.0-Beta2" />
1313
</ItemGroup>
1414
</Project>

Windows/Common/Core/Common.Windows.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.2.12691.0-Beta2" />
17+
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.3.12907.0-Beta2" />
1818
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1919
</ItemGroup>
2020
</Project>

Windows/Common/Rpc/GrpcClient.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using ITHit.FileSystem.Samples.Common.Windows.Rpc.Generated;
33
using GrpcDotNetNamedPipes;
4+
using System.IO;
5+
using System.Security.Principal;
46

57
namespace ITHit.FileSystem.Samples.Common.Windows.Rpc
68
{
@@ -13,8 +15,7 @@ public class GrpcClient
1315

1416
public GrpcClient(string channelName)
1517
{
16-
if (string.IsNullOrEmpty(rpcCommunicationChannelName))
17-
rpcCommunicationChannelName = channelName;
18+
rpcCommunicationChannelName = channelName;
1819
}
1920

2021
public const int ConnectionTimeoutMs = 1000;
@@ -35,10 +36,12 @@ private static ShellExtensionRpc.ShellExtensionRpcClient Connect()
3536
{
3637
ConnectionTimeout = ConnectionTimeoutMs,
3738
CurrentUserOnly = true,
38-
ImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.None
39+
ImpersonationLevel = TokenImpersonationLevel.None
3940
};
4041

41-
NamedPipeChannel channel = new NamedPipeChannel(".", rpcCommunicationChannelName, options);
42+
var pipeName = Path.Combine(WindowsIdentity.GetCurrent().Owner.Value, rpcCommunicationChannelName);
43+
44+
NamedPipeChannel channel = new NamedPipeChannel(".", pipeName, options);
4245
ShellExtensionRpc.ShellExtensionRpcClient client = new ShellExtensionRpc.ShellExtensionRpcClient(channel);
4346
return client;
4447
}

Windows/Common/ShellExtension/Common.Windows.ShellExtension.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
2121
</ItemGroup>
2222
<ItemGroup>
23-
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.2.12691.0-Beta2" />
23+
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.3.12907.0-Beta2" />
2424
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2525
<ProjectReference Include="..\Rpc.Proto\Common.Windows.Rpc.Proto.csproj" />
2626
<ProjectReference Include="..\Rpc\Common.Windows.Rpc.csproj" />

Windows/Common/ShellExtension/ContextMenusProviderBase.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
namespace ITHit.FileSystem.Samples.Common.Windows.ShellExtension
1313
{
1414
/// <summary>
15-
/// Base class which implements logic to extend Windows Explorer commands.
15+
/// Common code to extend Windows Explorer commands.
1616
/// </summary>
17+
/// <remarks>
18+
/// You will derive your class from this class to implement your Windows Explorer context menu.
19+
/// Typically you do not need to make any changes in this class.
20+
/// </remarks>
1721
public abstract class ContextMenusProviderBase : IExplorerCommand
1822
{
1923
/// <summary>

Windows/Common/ShellExtension/ThumbnailProviderBase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
namespace ITHit.FileSystem.Samples.Common.Windows.ShellExtension.Thumbnails
1010
{
11+
12+
/// <summary>
13+
/// Common code for a thumbnails provider.
14+
/// </summary>
15+
/// <remarks>
16+
/// You will derive your class from this class to implement your Thumbnails provider Windows Shell Extension
17+
/// Typically you do not need to make any changes in this class.
18+
/// </remarks>
1119
public abstract class ThumbnailProviderBase : InitializedWithItem, IThumbnailProvider
1220
{
1321
public abstract Task<byte[]> GetThumbnailsAsync(string filePath, uint size);

Windows/Common/VirtualDrive/Common.Windows.VirtualDrive.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
2424
</ItemGroup>
2525
<ItemGroup>
26-
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.2.12691.0-Beta2" />
26+
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.3.12907.0-Beta2" />
2727
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2828
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
2929
<ProjectReference Include="..\Rpc.Proto\Common.Windows.Rpc.Proto.csproj" />

Windows/Common/VirtualDrive/Filter/FilterHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static bool AvoidSync(string path)
2121
}
2222

2323
/// <summary>
24-
/// Returns true if file system contains an application lock-file (~$*.docx, *.dwl, *.dwl2) in file
24+
/// Returns true if file system contains an application lock-file (~$*.docx, *.dwl, *.dwl2, etc) in the file
2525
/// system that corresponds to the provided path to the file file. False - otherwise.
2626
/// </summary>
2727
/// <param name="path">Path to the file to check the lock-file for.</param>

Windows/Common/VirtualDrive/Rpc/GrpcServer.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using System;
2-
using ITHit.FileSystem.Windows;
32
using ITHit.FileSystem.Samples.Common.Windows.Rpc.Generated;
43
using GrpcDotNetNamedPipes;
54
using log4net;
65
using System.IO.Pipes;
76
using System.Security.Principal;
87
using System.Security.AccessControl;
8+
using System.IO;
99

1010
namespace ITHit.FileSystem.Samples.Common.Windows.Rpc
1111
{
@@ -40,14 +40,16 @@ public void Start()
4040
Stop();
4141
}
4242

43-
NamedPipeServer server = new NamedPipeServer(rpcCommunicationChannelName, new NamedPipeServerOptions() {
43+
var pipeName = Path.Combine(WindowsIdentity.GetCurrent().Owner.Value, rpcCommunicationChannelName);
44+
45+
NamedPipeServer server = new NamedPipeServer(pipeName, new NamedPipeServerOptions() {
4446
CurrentUserOnly = true
4547
});
46-
ShellExtensionRpc.BindService(server.ServiceBinder, new GprcServerServiceImpl(engine, this));
48+
ShellExtensionRpc.BindService(server.ServiceBinder, new GrpcServerServiceImpl(engine, this));
4749
server.Start();
4850
namedPipeServer = server;
4951

50-
LogMessage("Started", rpcCommunicationChannelName);
52+
LogMessage("Started", pipeName);
5153
}
5254
catch (Exception ex)
5355
{

Windows/Common/VirtualDrive/Rpc/GprcServerServiceImpl.cs renamed to Windows/Common/VirtualDrive/Rpc/GrpcServerServiceImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ namespace ITHit.FileSystem.Samples.Common.Windows.Rpc
1212
/// <summary>
1313
/// RPC methods handler.
1414
/// </summary>
15-
public class GprcServerServiceImpl : ShellExtensionRpc.ShellExtensionRpcBase
15+
public class GrpcServerServiceImpl : ShellExtensionRpc.ShellExtensionRpcBase
1616
{
1717
private static EmptyMessage EmptyMessage = new EmptyMessage();
1818

1919
private VirtualEngineBase engine;
2020
private ILogger logger;
2121

22-
public GprcServerServiceImpl(VirtualEngineBase engine, ILogger logger)
22+
public GrpcServerServiceImpl(VirtualEngineBase engine, ILogger logger)
2323
{
2424
this.engine = engine;
2525
this.logger = logger;

0 commit comments

Comments
 (0)