Обнновлено до .net10

This commit is contained in:
FrigaT
2026-04-10 15:05:32 +03:00
parent 11d0b0d72f
commit 8444fc5f8e
386 changed files with 6361 additions and 7164 deletions

View File

@@ -1,10 +1,9 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
public class YApiRequestAttribute : YBasePathRequestAttribute
{
public class YApiRequestAttribute : YBasePathRequestAttribute
public YApiRequestAttribute(string method, string url) : base(method, url)
{
public YApiRequestAttribute(string method, string url) : base(method, url)
{
basePath = "https://api.music.yandex.net";
}
basePath = "https://api.music.yandex.net";
}
}

View File

@@ -1,32 +1,31 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
/// <summary>
/// Атрибут запроса относительно базового адреса
/// </summary>
public class YBasePathRequestAttribute : YRequestAttribute
{
/// <summary>
/// Атрибут запроса относительно базового адреса
/// </summary>
public class YBasePathRequestAttribute : YRequestAttribute
#region Поля
protected string basePath;
#endregion Поля
#region Свойства
public override string Url => GetFullUrl();
#endregion Свойства
#region Вспомогательные функции
private string GetFullUrl()
{
#region Поля
return $"{basePath.TrimEnd('/')}/{path.TrimStart('/')}";
}
protected string basePath;
#endregion Вспомогательные функции
#endregion Поля
#region Свойства
public override string Url => GetFullUrl();
#endregion Свойства
#region Вспомогательные функции
private string GetFullUrl()
{
return $"{basePath.TrimEnd('/')}/{path.TrimStart('/')}";
}
#endregion Вспомогательные функции
public YBasePathRequestAttribute(string method, string url) : base(method, url)
{
}
public YBasePathRequestAttribute(string method, string url) : base(method, url)
{
}
}

View File

@@ -1,10 +1,9 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
public class YLoginRequestAttribute : YBasePathRequestAttribute
{
public class YLoginRequestAttribute : YBasePathRequestAttribute
public YLoginRequestAttribute(string method, string url) : base(method, url)
{
public YLoginRequestAttribute(string method, string url) : base(method, url)
{
basePath = "https://login.yandex.ru";
}
basePath = "https://login.yandex.ru";
}
}

View File

@@ -1,10 +1,9 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
public class YMobileProxyRequestAttribute : YBasePathRequestAttribute
{
public class YMobileProxyRequestAttribute : YBasePathRequestAttribute
public YMobileProxyRequestAttribute(string method, string url) : base(method, url)
{
public YMobileProxyRequestAttribute(string method, string url) : base(method, url)
{
basePath = "https://mobileproxy.passport.yandex.net";
}
basePath = "https://mobileproxy.passport.yandex.net";
}
}

View File

@@ -1,10 +1,9 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
public class YOAuthMobileAttribute : YBasePathRequestAttribute
{
public class YOAuthMobileAttribute : YBasePathRequestAttribute
public YOAuthMobileAttribute(string method, string url) : base(method, url)
{
public YOAuthMobileAttribute(string method, string url) : base(method, url)
{
basePath = "https://oauth.mobile.yandex.net";
}
basePath = "https://oauth.mobile.yandex.net";
}
}

View File

@@ -1,10 +1,9 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
public class YOAuthRequestAttribute : YBasePathRequestAttribute
{
public class YOAuthRequestAttribute : YBasePathRequestAttribute
public YOAuthRequestAttribute(string method, string url) : base(method, url)
{
public YOAuthRequestAttribute(string method, string url) : base(method, url)
{
basePath = "https://oauth.yandex.ru";
}
basePath = "https://oauth.yandex.ru";
}
}

View File

@@ -1,10 +1,9 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
public class YPassportRequestAttribute : YBasePathRequestAttribute
{
public class YPassportRequestAttribute : YBasePathRequestAttribute
public YPassportRequestAttribute(string method, string url) : base(method, url)
{
public YPassportRequestAttribute(string method, string url) : base(method, url)
{
basePath = "https://passport.yandex.ru";
}
basePath = "https://passport.yandex.ru";
}
}

View File

@@ -1,27 +1,26 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
/// <summary>
/// Атрибут запроса без привязки к базовому адресу
/// </summary>
public class YRequestAttribute : Attribute
{
/// <summary>
/// Атрибут запроса без привязки к базовому адресу
/// </summary>
public class YRequestAttribute : Attribute
#region Поля
protected string path;
#endregion Поля
#region Свойства
public string Method { get; }
public virtual string Url => path;
#endregion Свойства
public YRequestAttribute(string method, string url)
{
#region Поля
protected string path;
#endregion Поля
#region Свойства
public string Method { get; }
public virtual string Url => path;
#endregion Свойства
public YRequestAttribute(string method, string url)
{
Method = method;
path = url;
}
Method = method;
path = url;
}
}

View File

@@ -1,10 +1,9 @@
namespace YandexMusic.API.Requests.Common.Attributes
namespace YandexMusic.API.Requests.Common.Attributes;
public class YWebApiRequestAttribute : YBasePathRequestAttribute
{
public class YWebApiRequestAttribute : YBasePathRequestAttribute
public YWebApiRequestAttribute(string method, string url) : base(method, url)
{
public YWebApiRequestAttribute(string method, string url) : base(method, url)
{
basePath = "https://music.yandex.ru";
}
basePath = "https://music.yandex.ru";
}
}