code optimization

This commit is contained in:
2024-06-05 19:15:32 +02:00
parent d4be7d0566
commit 1b49c54822
151 changed files with 4124 additions and 4673 deletions

View File

@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
public interface IOcsResponse
{
public interface IOcsResponse
{
}
}

View File

@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
public interface IOcsResponseData
{
public interface IOcsResponseData
{
}
}

View File

@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
public interface IOcsResponseMeta
{
public interface IOcsResponseMeta
{
}
}

View File

@@ -1,26 +1,20 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
public class OcsResponse<TMeta, TData> : IOcsResponse where TMeta : IOcsResponseMeta where TData : IOcsResponseData
{
public class OcsResponse<TMeta, TData> : IOcsResponse where TMeta : IOcsResponseMeta where TData : IOcsResponseData
{
[JsonProperty("meta")]
public TMeta? Meta { get; set; }
[JsonProperty("meta")]
public TMeta? Meta { get; set; }
[JsonProperty("data")]
public TData? Data { get; set; }
}
public class OcsResponse<TData> : OcsResponse<OcsResponseMeta, TData> where TData : IOcsResponseData
{
}
public class OcsResponse : OcsResponse<OcsResponseMeta, OcsResponseData>
{
}
[JsonProperty("data")]
public TData? Data { get; set; }
}
public class OcsResponse<TData> : OcsResponse<OcsResponseMeta, TData> where TData : IOcsResponseData
{
}
public class OcsResponse : OcsResponse<OcsResponseMeta, OcsResponseData>
{
}

View File

@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
public class OcsResponseData : IOcsResponseData
{
public class OcsResponseData : IOcsResponseData
{
}
}

View File

@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
public class OcsResponseDataArray<TEntry> : List<TEntry>, IOcsResponseData where TEntry : OcsResponseDataEntry
{
public class OcsResponseDataArray<TEntry> : List<TEntry>, IOcsResponseData where TEntry : OcsResponseDataEntry
{
}
}

View File

@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
public class OcsResponseDataEntry
{
public class OcsResponseDataEntry
{
}
}

View File

@@ -1,21 +1,15 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses
namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs.Responses;
public class OcsResponseMeta : IOcsResponseMeta
{
public class OcsResponseMeta : IOcsResponseMeta
{
[JsonProperty("status")]
public string? Status { get; set; }
[JsonProperty("status")]
public string? Status { get; set; }
[JsonProperty("statuscode")]
public int? StatusCode { get; set; }
[JsonProperty("statuscode")]
public int? StatusCode { get; set; }
[JsonProperty("message")]
public string? Message { get; set; }
}
[JsonProperty("message")]
public string? Message { get; set; }
}