Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
yar229 committed Mar 19, 2017
2 parents fc3c621 + 80806c9 commit c4f9bf6
Show file tree
Hide file tree
Showing 18 changed files with 324 additions and 26 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
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
1 change: 1 addition & 0 deletions NWebDAV
Submodule NWebDAV added at bdfa57
4 changes: 2 additions & 2 deletions WDMRC.Console/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.5.61.0")]
[assembly: AssemblyFileVersion("1.5.61.0")]


[assembly: log4net.Config.XmlConfigurator(Watch = true)]
16 changes: 8 additions & 8 deletions WDMRC.Console/WDMRC.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@
<HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nwebdav.server, Version=0.1.24.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NWebDav.Server.0.1.24.0\lib\net45\nwebdav.server.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NWebDav.Server.HttpListener, Version=0.1.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NWebDav.Server.HttpListener.0.1.22.0\lib\net45\NWebDav.Server.HttpListener.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
Expand All @@ -85,6 +77,14 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NWebDAV\NWebDav.Server.HttpListener\NWebDav.Server.HttpListener.csproj">
<Project>{985fbdf1-1e48-4283-98df-1457f621c979}</Project>
<Name>NWebDav.Server.HttpListener</Name>
</ProjectReference>
<ProjectReference Include="..\NWebDAV\NWebDav.Server\NWebDav.Server.csproj">
<Project>{695b7314-009e-42a9-bbdf-223f298622d1}</Project>
<Name>NWebDav.Server</Name>
</ProjectReference>
<ProjectReference Include="..\WebDavMailRuCloudStore\WebDavMailRuCloudStore.csproj">
<Project>{F8FA91A5-466D-4072-8D7B-7791831F520D}</Project>
<Name>WebDavMailRuCloudStore</Name>
Expand Down
2 changes: 0 additions & 2 deletions WDMRC.Console/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
<packages>
<package id="CommandLineParser" version="2.1.1-beta" targetFramework="net45" />
<package id="log4net" version="2.0.7" targetFramework="net45" />
<package id="NWebDav.Server" version="0.1.24.0" targetFramework="net45" />
<package id="NWebDav.Server.HttpListener" version="0.1.22.0" targetFramework="net45" />
</packages>
62 changes: 60 additions & 2 deletions WebDAVMailRuCloud.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDMRC.Console", "WDMRC.Console\WDMRC.Console.csproj", "{9E1B53CF-F6CD-4861-A177-E06DBC95CD7D}"
EndProject
Expand All @@ -14,6 +14,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
readme.md = readme.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NWebDAV", "NWebDAV", "{BDE6F8E2-9F7F-4ADF-8972-4589485E3FCB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NWebDav.Server", "NWebDAV\NWebDav.Server\NWebDav.Server.csproj", "{695B7314-009E-42A9-BBDF-223F298622D1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NWebDav.Server.HttpListener", "NWebDAV\NWebDav.Server.HttpListener\NWebDav.Server.HttpListener.csproj", "{985FBDF1-1E48-4283-98DF-1457F621C979}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -102,8 +108,60 @@ Global
{F8FA91A5-466D-4072-8D7B-7791831F520D}.ReleaseBinaries|x64.Build.0 = Release|Any CPU
{F8FA91A5-466D-4072-8D7B-7791831F520D}.ReleaseBinaries|x86.ActiveCfg = Release|Any CPU
{F8FA91A5-466D-4072-8D7B-7791831F520D}.ReleaseBinaries|x86.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|ARM.ActiveCfg = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|ARM.Build.0 = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|x64.ActiveCfg = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|x64.Build.0 = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Debug|x86.Build.0 = Debug|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|Any CPU.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|ARM.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|ARM.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|x64.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|x64.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|x86.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.Release|x86.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|Any CPU.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|Any CPU.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|ARM.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|ARM.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|x64.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|x64.Build.0 = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|x86.ActiveCfg = Release|Any CPU
{695B7314-009E-42A9-BBDF-223F298622D1}.ReleaseBinaries|x86.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|Any CPU.Build.0 = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|ARM.ActiveCfg = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|ARM.Build.0 = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|x64.ActiveCfg = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|x64.Build.0 = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|x86.ActiveCfg = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Debug|x86.Build.0 = Debug|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|Any CPU.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|Any CPU.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|ARM.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|ARM.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|x64.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|x64.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|x86.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.Release|x86.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|Any CPU.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|Any CPU.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|ARM.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|ARM.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|x64.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|x64.Build.0 = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|x86.ActiveCfg = Release|Any CPU
{985FBDF1-1E48-4283-98DF-1457F621C979}.ReleaseBinaries|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{695B7314-009E-42A9-BBDF-223F298622D1} = {BDE6F8E2-9F7F-4ADF-8972-4589485E3FCB}
{985FBDF1-1E48-4283-98DF-1457F621C979} = {BDE6F8E2-9F7F-4ADF-8972-4589485E3FCB}
EndGlobalSection
EndGlobal
21 changes: 21 additions & 0 deletions WebDavMailRuCloudStore/DavCustomProperty/DavBsiisreadonly.cs
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;
}
}
21 changes: 21 additions & 0 deletions WebDavMailRuCloudStore/DavCustomProperty/DavCollection.cs
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;
}
}
21 changes: 21 additions & 0 deletions WebDavMailRuCloudStore/DavCustomProperty/DavHref.cs
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;
}
}
21 changes: 21 additions & 0 deletions WebDavMailRuCloudStore/DavCustomProperty/DavIsreadonly.cs
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 WebDavMailRuCloudStore/DavCustomProperty/DavLastAccessed.cs
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;
}
}
21 changes: 21 additions & 0 deletions WebDavMailRuCloudStore/DavCustomProperty/DavLoctoken.cs
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 WebDavMailRuCloudStore/DavCustomProperty/DavSrtfileattributes.cs
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;
}
}
Loading

0 comments on commit c4f9bf6

Please sign in to comment.