-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
324 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "MailRuNetCloudClient"] | ||
path = MailRuNetCloudClient | ||
url = https://github.com/yar229/Mail.Ru-.net-cloud-client.git | ||
[submodule "NWebDAV"] | ||
path = NWebDAV | ||
url = https://github.com/yar229/nwebdav.git |
Submodule MailRuNetCloudClient
updated
3 files
+23 −6 | MailRuCloudApi/Api/DownloadStream.cs | |
+10 −5 | MailRuCloudApi/Api/RingBufferedStream.cs | |
+3 −3 | MailRuCloudApi/Api/UploadStream.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
WebDavMailRuCloudStore/DavCustomProperty/DavBsiisreadonly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Xml.Linq; | ||
using NWebDav.Server; | ||
using NWebDav.Server.Props; | ||
using NWebDav.Server.Stores; | ||
|
||
namespace YaR.WebDavMailRu.CloudStore.DavCustomProperty | ||
{ | ||
public class DavBsiisreadonly<TEntry> : DavBoolean<TEntry> where TEntry : IStoreItem | ||
{ | ||
/// <summary> | ||
/// Name of the property (static). | ||
/// </summary> | ||
// ReSharper disable once StaticMemberInGenericType | ||
public static readonly XName PropertyName = WebDavNamespaces.DavNs + "BSI_isreadonly"; | ||
|
||
/// <summary> | ||
/// Name of the property. | ||
/// </summary> | ||
public override XName Name => PropertyName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Xml.Linq; | ||
using NWebDav.Server; | ||
using NWebDav.Server.Props; | ||
using NWebDav.Server.Stores; | ||
|
||
namespace YaR.WebDavMailRu.CloudStore.DavCustomProperty | ||
{ | ||
public class DavCollection<TEntry> : DavBoolean<TEntry> where TEntry : IStoreItem | ||
{ | ||
/// <summary> | ||
/// Name of the property (static). | ||
/// </summary> | ||
// ReSharper disable once StaticMemberInGenericType | ||
public static readonly XName PropertyName = WebDavNamespaces.DavNs + "collection"; | ||
|
||
/// <summary> | ||
/// Name of the property. | ||
/// </summary> | ||
public override XName Name => PropertyName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Xml.Linq; | ||
using NWebDav.Server; | ||
using NWebDav.Server.Props; | ||
using NWebDav.Server.Stores; | ||
|
||
namespace YaR.WebDavMailRu.CloudStore.DavCustomProperty | ||
{ | ||
public class DavHref<TEntry> : DavString<TEntry> where TEntry : IStoreItem | ||
{ | ||
/// <summary> | ||
/// Name of the property (static). | ||
/// </summary> | ||
// ReSharper disable once StaticMemberInGenericType | ||
public static readonly XName PropertyName = WebDavNamespaces.DavNs + "href"; | ||
|
||
/// <summary> | ||
/// Name of the property. | ||
/// </summary> | ||
public override XName Name => PropertyName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Xml.Linq; | ||
using NWebDav.Server; | ||
using NWebDav.Server.Props; | ||
using NWebDav.Server.Stores; | ||
|
||
namespace YaR.WebDavMailRu.CloudStore.DavCustomProperty | ||
{ | ||
public class DavIsreadonly<TEntry> : DavBoolean<TEntry> where TEntry : IStoreItem | ||
{ | ||
/// <summary> | ||
/// Name of the property (static). | ||
/// </summary> | ||
// ReSharper disable once StaticMemberInGenericType | ||
public static readonly XName PropertyName = WebDavNamespaces.DavNs + "isreadonly"; | ||
|
||
/// <summary> | ||
/// Name of the property. | ||
/// </summary> | ||
public override XName Name => PropertyName; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
WebDavMailRuCloudStore/DavCustomProperty/DavLastAccessed.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Xml.Linq; | ||
using NWebDav.Server; | ||
using NWebDav.Server.Props; | ||
using NWebDav.Server.Stores; | ||
|
||
namespace YaR.WebDavMailRu.CloudStore.DavCustomProperty | ||
{ | ||
public class DavLastAccessed<TEntry> : DavRfc1123Date<TEntry> where TEntry : IStoreItem | ||
{ | ||
/// <summary>Name of the property (static).</summary> | ||
public static readonly XName PropertyName = WebDavNamespaces.DavNs + "lastaccessed"; | ||
|
||
/// <summary>Name of the property.</summary> | ||
public override XName Name => PropertyName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Xml.Linq; | ||
using NWebDav.Server; | ||
using NWebDav.Server.Props; | ||
using NWebDav.Server.Stores; | ||
|
||
namespace YaR.WebDavMailRu.CloudStore.DavCustomProperty | ||
{ | ||
public class DavLoctoken<TEntry> : DavString<TEntry> where TEntry : IStoreItem | ||
{ | ||
/// <summary> | ||
/// Name of the property (static). | ||
/// </summary> | ||
// ReSharper disable once StaticMemberInGenericType | ||
public static readonly XName PropertyName = WebDavNamespaces.DavNs + "locktoken"; | ||
|
||
/// <summary> | ||
/// Name of the property. | ||
/// </summary> | ||
public override XName Name => PropertyName; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
WebDavMailRuCloudStore/DavCustomProperty/DavSrtfileattributes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.IO; | ||
using System.Xml.Linq; | ||
using NWebDav.Server; | ||
using NWebDav.Server.Http; | ||
using NWebDav.Server.Props; | ||
using NWebDav.Server.Stores; | ||
|
||
namespace YaR.WebDavMailRu.CloudStore.DavCustomProperty | ||
{ | ||
public class DavSrtfileattributes<TEntry> : DavTypedProperty<TEntry, FileAttributes> where TEntry : IStoreItem | ||
{ | ||
private class FileAttributesConverter : IConverter | ||
{ | ||
public object ToXml(IHttpContext httpContext, FileAttributes value) => ((int)value).ToString("X8"); | ||
public FileAttributes FromXml(IHttpContext httpContext, object value) => (FileAttributes)Convert.ToInt32((string)value, 16); | ||
} | ||
|
||
private static IConverter TypeConverter { get; } = new FileAttributesConverter(); | ||
|
||
/// <summary> | ||
/// Name of the property (static). | ||
/// </summary> | ||
// ReSharper disable once StaticMemberInGenericType | ||
public static readonly XName PropertyName = WebDavNamespaces.DavNs + "SRT_fileattributes"; | ||
|
||
/// <summary> | ||
/// Name of the property. | ||
/// </summary> | ||
public override XName Name => PropertyName; | ||
|
||
/// <summary> | ||
/// Converter that is used to convert the actual value into the XML | ||
/// format that is required by WebDAV. | ||
/// </summary> | ||
public override IConverter Converter => TypeConverter; | ||
} | ||
} |
Oops, something went wrong.