Skip to content

Commit baed9de

Browse files
committed
v7.0.22091.0-Beta
1 parent 0a8c58e commit baed9de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+516
-884
lines changed

Common/Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Platforms>AnyCPU;x64</Platforms>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="ITHit.FileSystem.Windows" Version="6.4.21218.0" />
14-
<PackageReference Include="ITHit.FileSystem" Version="6.4.21218.0" />
13+
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22091.0-Beta" />
14+
<PackageReference Include="ITHit.FileSystem" Version="7.0.22091.0-Beta" />
1515
</ItemGroup>
1616
</Project>

Common/FileSystemItemMetadataExt.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using ITHit.FileSystem;
2+
using ITHit.FileSystem.Synchronization;
23
using System;
34
using System.Collections.Generic;
45
using System.IO;
@@ -11,7 +12,7 @@ namespace ITHit.FileSystem.Samples.Common
1112
/// In addition to properties provided by <see cref="IFileSystemItem"/> this class contains
1213
/// <see cref="ETag"/> and <see cref="Lock"/> properties.
1314
/// </summary>
14-
public class FileSystemItemMetadataExt : IFileSystemItemMetadata
15+
public class FileSystemItemMetadataExt : IFileSystemItemMetadata, IChangedItem
1516
{
1617
/// <inheritdoc/>
1718
public byte[] RemoteStorageItemId { get; set; }
@@ -51,5 +52,10 @@ public class FileSystemItemMetadataExt : IFileSystemItemMetadata
5152
/// Custom columns data to be displayed in the file manager.
5253
/// </summary>
5354
public IEnumerable<FileSystemItemPropertyData> CustomProperties { get; set; } = new FileSystemItemPropertyData[] { };
55+
56+
/// <summary>
57+
/// Type of change.
58+
/// </summary>
59+
public Change ChangeType { get; set; }
5460
}
5561
}

Windows/Common/Core/Commands.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ public async Task StopEngineAsync()
162162
/// <summary>
163163
/// Opens Windows File Manager with both remote storage and user file system for testing.
164164
/// </summary>
165+
/// <param name="openRemoteStorage">True if the Remote Storage must be opened. False - otherwise.</param>
165166
/// <remarks>This method is provided solely for the development and testing convenience.</remarks>
166-
public void ShowTestEnvironment()
167+
public void ShowTestEnvironment(bool openRemoteStorage = true)
167168
{
168169
// Enable UTF8 for Console Window and set width.
169170
Console.OutputEncoding = System.Text.Encoding.UTF8;
@@ -173,8 +174,11 @@ public void ShowTestEnvironment()
173174
// Open Windows File Manager with user file system.
174175
Commands.Open(Engine.Path);
175176

176-
// Open remote storage.
177-
Commands.Open(remoteStorageRootPath);
177+
if (openRemoteStorage)
178+
{
179+
// Open remote storage.
180+
Commands.Open(remoteStorageRootPath);
181+
}
178182
}
179183
#endif
180184
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
2121
</ItemGroup>
2222
<ItemGroup>
23-
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="6.4.21218.0" />
24-
<PackageReference Include="ITHit.FileSystem.Windows" Version="6.4.21218.0" />
23+
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22091.0-Beta" />
24+
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22091.0-Beta" />
2525
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2626
</ItemGroup>
2727
</Project>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Compile Remove="IVirtualFolder.cs" />
1414
</ItemGroup>
1515
<ItemGroup>
16-
<PackageReference Include="ITHit.FileSystem.Windows" Version="6.4.21218.0" />
16+
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22091.0-Beta" />
1717
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1818
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
1919
</ItemGroup>

Windows/Common/VirtualDrive/PlaceholderItemExtensions.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Threading.Tasks;
66

77
using ITHit.FileSystem.Windows;
8+
using ITHit.FileSystem.Windows.Properties;
89

910

1011
namespace ITHit.FileSystem.Samples.Common.Windows
@@ -38,13 +39,24 @@ public static async Task<bool> IsModifiedAsync(this PlaceholderItem placeholder,
3839
/// <param name="placeholder">User file system placeholder item.</param>
3940
/// <param name="remoteStorageItem">Remote storage item metadata.</param>
4041
/// <returns>A task object that can be awaited.</returns>
41-
public static async Task SavePropertiesAsync(this PlaceholderItem placeholder, FileSystemItemMetadataExt metadata)
42+
public static async Task SavePropertiesAsync(this PlaceholderItem placeholder, FileSystemItemMetadataExt metadata, ILogger logger = null)
4243
{
4344
// Save lock.
4445
if (metadata.Lock != null)
4546
{
4647
placeholder.SetLockInfo(metadata.Lock);
4748
}
49+
else
50+
{
51+
if (placeholder.TryGetLockInfo(out _) && placeholder.TryDeleteLockInfo())
52+
{
53+
PlaceholderItem.UpdateUI(placeholder.Path);
54+
if (logger != null)
55+
{
56+
logger.LogMessage("Unlocked", placeholder.Path);
57+
}
58+
}
59+
}
4860

4961
// Save eTag.
5062
if (metadata.ETag != null)

Windows/VirtualDrive/VirtualDrive.ShellExtension/VirtualDrive.ShellExtension.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
2020
</ItemGroup>
2121
<ItemGroup>
22-
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="6.4.21218.0" />
22+
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.0.22091.0-Beta" />
2323
</ItemGroup>
2424
<ItemGroup>
2525
<None Update="log4net.config">

Windows/VirtualDrive/VirtualDrive/Program.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using ITHit.FileSystem.Windows;
1111
using ITHit.FileSystem.Samples.Common.Windows;
1212
using ITHit.FileSystem.Windows.Package;
13+
using ITHit.FileSystem;
1314

1415
namespace VirtualDrive
1516
{
@@ -112,7 +113,7 @@ static async Task Main(string[] args)
112113
using (ShellExtension.ShellExtensions.StartComServer(Settings.ShellExtensionsComServerRpcEnabled))
113114
{
114115
// Run the User File System Engine.
115-
await RunEngine();
116+
await RunEngineAsync();
116117
}
117118
}
118119
catch (Exception ex)
@@ -134,7 +135,7 @@ private static void ValidatePackagePrerequisites()
134135
}
135136
}
136137

137-
private static async Task RunEngine()
138+
private static async Task RunEngineAsync()
138139
{
139140
// Register sync root and create app folders.
140141
await registrar.RegisterSyncRootAsync(Settings.ProductName, Path.Combine(Settings.IconsFolderPath, "Drive.ico"), Settings.ShellExtensionsComServerExePath);
@@ -158,7 +159,7 @@ private static async Task RunEngine()
158159
// Set the remote storage item ID for the root item. It will be passed to the IEngine.GetFileSystemItemAsync()
159160
// method as a remoteStorageItemId parameter when a root folder is requested.
160161
byte[] itemId = WindowsFileSystemItem.GetItemIdByPath(Settings.RemoteStorageRootPath);
161-
Engine.Placeholders.GetRootItem().SetRemoteStorageItemId(itemId);
162+
Engine.SetRemoteStorageRootItemId(itemId);
162163

163164
// Print console commands.
164165
consoleProcessor.PrintHelp();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
This folder demonstrates how to limit folder operations using IFolder.GetFolderOperationControlAsync() method.
2-
When a user copies, moves, deletes, renames, hydrates or dehydrates this folder a message box is displayed to confirm or cancel the operation.
2+
When a user copies, moves, deletes, renames, hydrates or dehydrates this folder, a message box is displayed to confirm or cancel the operation.

Windows/VirtualDrive/VirtualDrive/VirtualDrive.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This is an advanced project with ETags support, Microsoft Office documents editi
4040
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
4141
</ItemGroup>
4242
<ItemGroup>
43-
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="6.4.21218.0" />
43+
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22091.0-Beta" />
4444
<ProjectReference Include="..\..\..\Common\Common.csproj" />
4545
<ProjectReference Include="..\..\Common\VirtualDrive\Common.Windows.VirtualDrive.csproj" />
4646
</ItemGroup>

0 commit comments

Comments
 (0)