Skip to content

Commit f38996f

Browse files
committed
v13.0.12190-Beta
1 parent e700a32 commit f38996f

File tree

1,956 files changed

+98581
-60483
lines changed

Some content is hidden

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

1,956 files changed

+98581
-60483
lines changed

CS/CalDAVServer.FileSystemStorage.AspNetCore/Acl/AclFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal static class AclFactory
1818
/// <param name="path">Relative path requested.</param>
1919
/// <param name="context">Instance of <see cref="DavContext"/> class.</param>
2020
/// <returns>Object implemening ACL principal or folder</returns>
21-
internal static async Task<IHierarchyItemAsync> GetAclItemAsync(DavContext context, string path)
21+
internal static async Task<IHierarchyItem> GetAclItemAsync(DavContext context, string path)
2222
{
2323
// If this is [DAVLocation]/acl - return folder which contains users and groups.
2424
if (path.Equals(AclFolder.AclFolderPath.Trim('/'), System.StringComparison.InvariantCultureIgnoreCase))

CS/CalDAVServer.FileSystemStorage.AspNetCore/Acl/User.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
using ITHit.WebDAV.Server;
99
using ITHit.WebDAV.Server.Acl;
10+
using IPrincipal = ITHit.WebDAV.Server.Acl.IPrincipal;
1011
using ITHit.WebDAV.Server.CalDav;
1112
using CalDAVServer.FileSystemStorage.AspNetCore.CalDav;
1213

@@ -16,7 +17,7 @@ namespace CalDAVServer.FileSystemStorage.AspNetCore.Acl
1617
/// This class represents user principal in WebDAV hierarchy.
1718
/// Instances of this class correspond to the following path: [DAVLocation]/acl/users/[UserID].
1819
/// </summary>
19-
public class User : Discovery, ICalendarPrincipalAsync
20+
public class User : Discovery, ICalendarPrincipal
2021
{
2122
private readonly string email;
2223

@@ -88,7 +89,7 @@ public User(DavContext context, string userId, string name, string email, DateTi
8889
/// <param name="destName">New user name.</param>
8990
/// <param name="deep">Whether to copy children - is not user.</param>
9091
/// <param name="multistatus">Is not used as there's no children.</param>
91-
public async Task CopyToAsync(IItemCollectionAsync destFolder, string destName, bool deep, MultistatusException multistatus)
92+
public async Task CopyToAsync(IItemCollection destFolder, string destName, bool deep, MultistatusException multistatus)
9293
{
9394
throw new DavException("Not implemented.", DavStatus.NOT_IMPLEMENTED);
9495
}
@@ -99,7 +100,7 @@ public async Task CopyToAsync(IItemCollectionAsync destFolder, string destName,
99100
/// <param name="destFolder">We don't use it as moving groups to different folder is not supported.</param>
100101
/// <param name="destName">New name.</param>
101102
/// <param name="multistatus">We don't use it as there're no child objects.</param>
102-
public async Task MoveToAsync(IItemCollectionAsync destFolder, string destName, MultistatusException multistatus)
103+
public async Task MoveToAsync(IItemCollection destFolder, string destName, MultistatusException multistatus)
103104
{
104105
throw new DavException("Not implemented.", DavStatus.NOT_IMPLEMENTED);
105106
}
@@ -150,7 +151,7 @@ public async Task UpdatePropertiesAsync(IList<PropertyValue> setProps, IList<Pro
150151
/// between users and groups.
151152
/// </summary>
152153
/// <param name="members">Members of the group.</param>
153-
public async Task SetGroupMembersAsync(IList<IPrincipalAsync> members)
154+
public async Task SetGroupMembersAsync(IList<IPrincipal> members)
154155
{
155156
throw new DavException("User objects can not contain other users.", DavStatus.CONFLICT);
156157
}
@@ -159,18 +160,18 @@ public async Task SetGroupMembersAsync(IList<IPrincipalAsync> members)
159160
/// Retrieves principal members. Users have no members, so return empty list.
160161
/// </summary>
161162
/// <returns>Principal members.</returns>
162-
public async Task<IEnumerable<IPrincipalAsync>> GetGroupMembersAsync()
163+
public async Task<IEnumerable<IPrincipal>> GetGroupMembersAsync()
163164
{
164-
return new IPrincipalAsync[0];
165+
return new IPrincipal[0];
165166
}
166167

167168
/// <summary>
168169
/// Gets groups to which this principal belongs.
169170
/// </summary>
170171
/// <returns>Enumerable with groups.</returns>
171-
public async Task<IEnumerable<IPrincipalAsync>> GetGroupMembershipAsync()
172+
public async Task<IEnumerable<IPrincipal>> GetGroupMembershipAsync()
172173
{
173-
return new IPrincipalAsync[0];
174+
return new IPrincipal[0];
174175
}
175176

176177
/// <summary>

CS/CalDAVServer.FileSystemStorage.AspNetCore/Acl/UsersFolder.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using ITHit.WebDAV.Server;
66
using ITHit.WebDAV.Server.Acl;
7+
using IPrincipal = ITHit.WebDAV.Server.Acl.IPrincipal;
78
using ITHit.WebDAV.Server.Paging;
89

910
namespace CalDAVServer.FileSystemStorage.AspNetCore.Acl
@@ -12,7 +13,7 @@ namespace CalDAVServer.FileSystemStorage.AspNetCore.Acl
1213
/// Logical folder which contains users.
1314
/// Instances of this class correspond to the following path: [DAVLocation]/acl/users/.
1415
/// </summary>
15-
public class UsersFolder : LogicalFolder, IPrincipalFolderAsync
16+
public class UsersFolder : LogicalFolder, IPrincipalFolder
1617
{
1718
/// <summary>
1819
/// This folder name.
@@ -45,7 +46,7 @@ public override async Task<PageResults> GetChildrenAsync(IList<PropertyName> pro
4546
/// In this implementation we list users from OWIN Identity or from membership provider,
4647
/// you can replace it with your own users source.
4748

48-
IList<IHierarchyItemAsync> children = new List<IHierarchyItemAsync>();
49+
IList<IHierarchyItem> children = new List<IHierarchyItem>();
4950

5051
children.Add(new User(Context, Context.Identity.Name, Context.Identity.Name, null, new DateTime(2000, 1, 1), new DateTime(2000, 1, 1)));
5152

@@ -55,7 +56,7 @@ public override async Task<PageResults> GetChildrenAsync(IList<PropertyName> pro
5556
/// <summary>
5657
/// We don't support creating folders inside this folder.
5758
/// </summary>
58-
public async Task<IPrincipalFolderAsync> CreateFolderAsync(string name)
59+
public async Task<IPrincipalFolder> CreateFolderAsync(string name)
5960
{
6061
throw new DavException("Not implemented.", DavStatus.NOT_IMPLEMENTED);
6162
}
@@ -65,7 +66,7 @@ public async Task<IPrincipalFolderAsync> CreateFolderAsync(string name)
6566
/// </summary>
6667
/// <param name="name">User name.</param>
6768
/// <returns>Newly created user.</returns>
68-
public async Task<IPrincipalAsync> CreatePrincipalAsync(string name)
69+
public async Task<IPrincipal> CreatePrincipalAsync(string name)
6970
{
7071
throw new DavException("Not implemented.", DavStatus.NOT_IMPLEMENTED);
7172
}
@@ -76,7 +77,7 @@ public async Task<IPrincipalAsync> CreatePrincipalAsync(string name)
7677
/// <param name="propValues">Properties and values to look for.</param>
7778
/// <param name="props">Properties that will be requested by the engine from the returned users.</param>
7879
/// <returns>Enumerable with users whose properties match.</returns>
79-
public async Task<IEnumerable<IPrincipalAsync>> FindPrincipalsByPropertyValuesAsync(
80+
public async Task<IEnumerable<IPrincipal>> FindPrincipalsByPropertyValuesAsync(
8081
IList<PropertyValue> propValues,
8182
IList<PropertyName> props)
8283
{
@@ -93,11 +94,11 @@ public async Task<IEnumerable<PropertyDescription>> GetPrincipalSearcheablePrope
9394
}
9495

9596
/// <summary>
96-
/// Returns <see cref="IPrincipalAsync"/> for the current user.
97+
/// Returns <see cref="IPrincipal"/> for the current user.
9798
/// </summary>
9899
/// <param name="props">Properties that will be asked later from the user returned.</param>
99100
/// <returns>Enumerable with users.</returns>
100-
public async Task<IEnumerable<IPrincipalAsync>> GetMatchingPrincipalsAsync(IList<PropertyName> props)
101+
public async Task<IEnumerable<IPrincipal>> GetMatchingPrincipalsAsync(IList<PropertyName> props)
101102
{
102103
throw new DavException("Not implemented.", DavStatus.NOT_IMPLEMENTED);
103104
}
Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11

22
<Project Sdk="Microsoft.NET.Sdk.Web">
3-
<PropertyGroup>
4-
<VersionPrefix>12.1.11824</VersionPrefix>
5-
<AssemblyName>CalDAVServer.FileSystemStorage.AspNetCore</AssemblyName>
6-
<TargetFramework>net6.0</TargetFramework>
7-
<LangVersion>8.0</LangVersion>
8-
<NullableContextOptions>enable</NullableContextOptions>
9-
</PropertyGroup>
10-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
11-
<NoWarn>1701;1702;1705;1998</NoWarn>
12-
</PropertyGroup>
13-
<ItemGroup>
14-
<None Remove="MyCustomHandlerPage.html" />
15-
<None Remove="App_Data\WebDav\Storage\qtest_*\**" />
16-
</ItemGroup>
17-
<ItemGroup>
18-
<Content Include="MyCustomHandlerPage.html">
19-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
20-
</Content>
21-
</ItemGroup>
22-
<ItemGroup>
23-
<PackageReference Include="ITHit.Server" Version="12.1.11824" />
24-
<PackageReference Include="ITHit.Server.Core" Version="12.1.11824" />
25-
<PackageReference Include="ITHit.WebDAV.Server" Version="12.1.11824" />
26-
<PackageReference Include="ITHit.GSuite.Server" Version="12.1.11824" />
27-
<PackageReference Include="System.Data.OleDb" Version="6.0.0" />
28-
</ItemGroup>
29-
<ItemGroup>
30-
<PackageReference Include="ITHit.Collab" Version="1.0.0.759" />
31-
</ItemGroup>
3+
<PropertyGroup>
4+
<VersionPrefix>13.0.12190-Beta</VersionPrefix>
5+
<AssemblyName>CalDAVServer.FileSystemStorage.AspNetCore</AssemblyName>
6+
<TargetFramework>net6.0</TargetFramework>
7+
<LangVersion>8.0</LangVersion>
8+
<NullableContextOptions>enable</NullableContextOptions>
9+
</PropertyGroup>
10+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
11+
<NoWarn>1701;1702;1705;1998</NoWarn>
12+
</PropertyGroup>
13+
<ItemGroup>
14+
<Content Include="MyCustomHandlerPage.html">
15+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16+
</Content>
17+
</ItemGroup>
18+
<ItemGroup>
19+
<PackageReference Include="ITHit.Server" Version="13.0.12190-Beta" />
20+
<PackageReference Include="ITHit.Server.Core" Version="13.0.12190-Beta" />
21+
<PackageReference Include="ITHit.WebDAV.Server" Version="13.0.12190-Beta" />
22+
<PackageReference Include="ITHit.GSuite.Server" Version="13.0.12190-Beta" />
23+
<PackageReference Include="System.Data.OleDb" Version="6.0.0" />
24+
</ItemGroup>
25+
<ItemGroup>
26+
<PackageReference Include="ITHit.Collab" Version="1.0.0.759" />
27+
</ItemGroup>
3228
</Project>

CS/CalDAVServer.FileSystemStorage.AspNetCore/CalDav/CalDavFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public static class CalDavFactory
1414
/// <param name="path">Relative path requested.</param>
1515
/// <param name="context">Instance of <see cref="DavContext"/> class.</param>
1616
/// <returns>Object implementing various CalDAV items or null if no object corresponding to path is found.</returns>
17-
internal static IHierarchyItemAsync GetCalDavItem(DavContext context, string path)
17+
internal static IHierarchyItem GetCalDavItem(DavContext context, string path)
1818
{
19-
IHierarchyItemAsync item = null;
19+
IHierarchyItem item = null;
2020

2121
item = CalendarsRootFolder.GetCalendarsRootFolder(context, path);
2222
if (item != null)

CS/CalDAVServer.FileSystemStorage.AspNetCore/CalDav/CalendarFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace CalDAVServer.FileSystemStorage.AspNetCore.CalDav
3131
/// |-- ...
3232
/// |-- [File X.ics] -- this class
3333
/// </example>
34-
public class CalendarFile : DavFile, ICalendarFileAsync
34+
public class CalendarFile : DavFile, ICalendarFile
3535
{
3636
/// <summary>
3737
/// Returns calendar file that corresponds to path or null if no calendar file is found.

CS/CalDAVServer.FileSystemStorage.AspNetCore/CalDav/CalendarFolder.cs

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using ITHit.WebDAV.Server;
99
using ITHit.WebDAV.Server.CalDav;
1010
using ITHit.WebDAV.Server.Acl;
11+
using IPrincipal = ITHit.WebDAV.Server.Acl.IPrincipal;
1112

1213
using CalDAVServer.FileSystemStorage.AspNetCore.Acl;
1314

@@ -17,7 +18,7 @@ namespace CalDAVServer.FileSystemStorage.AspNetCore.CalDav
1718
/// Represents CalDAV calendar (calendar folder).
1819
/// Instances of this class correspond to the following path: [DAVLocation]/calendars/[user_name]/[calendar_name]/
1920
/// </summary>
20-
/// <remarks>Mozilla Thunderbird Lightning requires ICurrentUserPrincipalAsync on calendar folder, it does not support discovery.</remarks>
21+
/// <remarks>Mozilla Thunderbird Lightning requires ICurrentUserPrincipal on calendar folder, it does not support discovery.</remarks>
2122
/// <example>
2223
/// [DAVLocation]
2324
/// |-- ...
@@ -29,9 +30,9 @@ namespace CalDAVServer.FileSystemStorage.AspNetCore.CalDav
2930
/// |-- [Calendar X] -- this class
3031
/// </example>
3132
/// <remarks>
32-
/// IAclHierarchyItemAsync is required by OS X Calendar.
33+
/// IAclHierarchyItem is required by OS X Calendar.
3334
/// </remarks>
34-
public class CalendarFolder : DavFolder, ICalendarFolderAsync, IAppleCalendarAsync, ICurrentUserPrincipalAsync, IAclHierarchyItemAsync
35+
public class CalendarFolder : DavFolder, ICalendarFolder, IAppleCalendar, ICurrentUserPrincipal, IAclHierarchyItem
3536
{
3637
/// <summary>
3738
/// Returns calendar folder that corresponds to path.
@@ -83,15 +84,15 @@ private CalendarFolder(DirectoryInfo directoryInfo, DavContext context, string p
8384
/// the Engine for each item that are returned from this method.
8485
/// </param>
8586
/// <returns>List of calendar files. Returns <b>null</b> for any item that is not found.</returns>
86-
public async Task<IEnumerable<ICalendarFileAsync>> MultiGetAsync(IEnumerable<string> pathList, IEnumerable<PropertyName> propNames)
87+
public async Task<IEnumerable<ICalendarFile>> MultiGetAsync(IEnumerable<string> pathList, IEnumerable<PropertyName> propNames)
8788
{
8889
// Here you can load all items from pathList in one request to your storage, instead of
8990
// getting items one-by-one using GetHierarchyItem call.
9091

91-
IList<ICalendarFileAsync> calendarFileList = new List<ICalendarFileAsync>();
92+
IList<ICalendarFile> calendarFileList = new List<ICalendarFile>();
9293
foreach (string path in pathList)
9394
{
94-
ICalendarFileAsync calendarFile = await context.GetHierarchyItemAsync(path) as ICalendarFileAsync;
95+
ICalendarFile calendarFile = await context.GetHierarchyItemAsync(path) as ICalendarFile;
9596
calendarFileList.Add(calendarFile);
9697
}
9798
return calendarFileList;
@@ -113,11 +114,11 @@ public async Task<IEnumerable<ICalendarFileAsync>> MultiGetAsync(IEnumerable<str
113114
/// the Engine for each item that are returned from this method.
114115
/// </param>
115116
/// <returns>List of calendar files. Returns <b>null</b> for any item that is not found.</returns>
116-
public async Task<IEnumerable<ICalendarFileAsync>> QueryAsync(string rawQuery, IEnumerable<PropertyName> propNames)
117+
public async Task<IEnumerable<ICalendarFile>> QueryAsync(string rawQuery, IEnumerable<PropertyName> propNames)
117118
{
118119
// For the sake of simplicity we just call GetChildren returning all items.
119120
// Typically you will return only items that match the query.
120-
return (await GetChildrenAsync(propNames.ToList(), null, null, null)).Page.Cast<ICalendarFileAsync>();
121+
return (await GetChildrenAsync(propNames.ToList(), null, null, null)).Page.Cast<ICalendarFile>();
121122
}
122123

123124
/// <summary>
@@ -301,8 +302,8 @@ public async Task<CalendarSharedBy> GetSharedByAsync()
301302
return CalendarSharedBy.NotShared;
302303
}
303304
304-
IPrincipalAsync principal = await this.GetCurrentUserPrincipalAsync();
305-
IPrincipalAsync owner = await this.GetOwnerAsync();
305+
IPrincipal principal = await this.GetCurrentUserPrincipalAsync();
306+
IPrincipal owner = await this.GetOwnerAsync();
306307
if(owner.Name.Equals(principal.Name))
307308
{
308309
return CalendarSharedBy.SharedByOwner;
@@ -314,7 +315,7 @@ public async Task<CalendarSharedBy> GetSharedByAsync()
314315
*/
315316
}
316317

317-
public Task SetOwnerAsync(IPrincipalAsync value)
318+
public Task SetOwnerAsync(IPrincipal value)
318319
{
319320
throw new NotImplementedException();
320321
}
@@ -324,9 +325,9 @@ public Task SetOwnerAsync(IPrincipalAsync value)
324325
/// </summary>
325326
/// <remarks>Required by OS X.</remarks>
326327
/// <returns>
327-
/// Item that represents owner of this item and implements <see cref="IPrincipalAsync"/>.
328+
/// Item that represents owner of this item and implements <see cref="IPrincipal"/>.
328329
/// </returns>
329-
public async Task<IPrincipalAsync> GetOwnerAsync()
330+
public async Task<IPrincipal> GetOwnerAsync()
330331
{
331332
// In this sample the address book is owned by the user that owns the folder in which address book is
332333
// located. Extract user name from parent folder name: [DAVLocation]/addressbooks/[user_name]/[addressbook_name]/
@@ -336,12 +337,12 @@ public async Task<IPrincipalAsync> GetOwnerAsync()
336337
return await User.GetUserAsync(context, userId);
337338
}
338339

339-
public Task SetGroupAsync(IPrincipalAsync value)
340+
public Task SetGroupAsync(IPrincipal value)
340341
{
341342
throw new NotImplementedException();
342343
}
343344

344-
public Task<IPrincipalAsync> GetGroupAsync()
345+
public Task<IPrincipal> GetGroupAsync()
345346
{
346347
throw new NotImplementedException();
347348
}
@@ -379,22 +380,22 @@ public Task<AclRestriction> GetAclRestrictionsAsync()
379380
throw new NotImplementedException();
380381
}
381382

382-
public Task<IEnumerable<IHierarchyItemAsync>> GetInheritedAclSetAsync()
383+
public Task<IEnumerable<IHierarchyItem>> GetInheritedAclSetAsync()
383384
{
384385
throw new NotImplementedException();
385386
}
386387

387-
public Task<IEnumerable<IPrincipalFolderAsync>> GetPrincipalCollectionSetAsync()
388+
public Task<IEnumerable<IPrincipalFolder>> GetPrincipalCollectionSetAsync()
388389
{
389390
throw new NotImplementedException();
390391
}
391392

392-
public Task<IPrincipalAsync> ResolveWellKnownPrincipalAsync(WellKnownPrincipal wellKnownPrincipal)
393+
public Task<IPrincipal> ResolveWellKnownPrincipalAsync(WellKnownPrincipal wellKnownPrincipal)
393394
{
394395
throw new NotImplementedException();
395396
}
396397

397-
public Task<IEnumerable<IAclHierarchyItemAsync>> GetItemsByPropertyAsync(MatchBy matchBy, IList<PropertyName> props)
398+
public Task<IEnumerable<IAclHierarchyItem>> GetItemsByPropertyAsync(MatchBy matchBy, IList<PropertyName> props)
398399
{
399400
throw new NotImplementedException();
400401
}

CS/CalDAVServer.FileSystemStorage.AspNetCore/CalDav/CalendarsRootFolder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private CalendarsRootFolder(DirectoryInfo directory, DavContext context, string
6060
/// <summary>
6161
/// Prohibit creating files in this folder.
6262
/// </summary>
63-
override public async Task<IFileAsync> CreateFileAsync(string name)
63+
override public async Task<IFile> CreateFileAsync(string name, Stream content, string contentType, long totalFileSize)
6464
{
6565
throw new DavException("Creating files in this folder is not implemented.", DavStatus.NOT_IMPLEMENTED);
6666
}
@@ -88,7 +88,7 @@ override public async Task CopyToAsync(IItemCollection destFolder, string destNa
8888
/// <summary>
8989
/// Prohibit moving or renaming this folder
9090
/// </summary>
91-
override public async Task MoveToAsync(IItemCollectionAsync destFolder, string destName, MultistatusException multistatus)
91+
override public async Task MoveToAsync(IItemCollection destFolder, string destName, MultistatusException multistatus)
9292
{
9393
throw new DavException("Moving or renaming this folder is not allowed.", DavStatus.NOT_ALLOWED);
9494
}

0 commit comments

Comments
 (0)