vknet_vk/VkNet/Model/ClientInfo.cs
1dNDN 7fa349d5e9
Исправить часть warning, обновить некоторые методы из #1222 (#1600)
## Список изменений
Исправлены warning
- Local constant 'expectedUserId' is never 
- Redundant 'Attribute' suffix
- Dictionary lookup can be simplified with 'TryGetValue'
- S6608: Indexing at 0 should be used instead of the "Enumerable"
extenion method "First"
- The keyword 'new' is required on 'AccessKey' because it hides property
'string VkNet.Model.MediaAttachment.AccessKey'
- Using directive is not required by the code and can be safely removed
- The keyword 'new' is required on 'PhotoId' because it hides property
'long? VkNet.Model.Comment.PhotoId'
- Conditional access qualifier expression is known to be not null
- Cannot resolve symbol BotsLongPollUpdatesHandler
- Code is unreachable

Обновил методы из #1222
- ads.getAds
- ads.getAdsLayout
- apps.get
- wall.postAdsStealth
- wall.editAdsStealth
- video.addToAlbum
- friends.areFriends
- friends.getMutual

##### Обязательно выполните следующие пункты:
- [x] Проверьте что ваш код не содержит конфликтов, и исправьте их по
необходимости
- [x] Напишите тесты, и обязательно проверьте что не падают другие.

##### Внимание! Pull Request'ы с непройденными тестами не принимаются
2023-11-11 22:48:59 +03:00

43 lines
No EOL
1.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using Newtonsoft.Json;
using VkNet.Enums;
using VkNet.Enums.StringEnums;
namespace VkNet.Model;
/// <summary>
/// Информация о доступных пользователю функциях.
/// </summary>
[Serializable]
public class ClientInfo
{
/// <summary>
/// Массив кнопок, которые поддерживает клиент.
/// </summary>
[JsonProperty("button_actions")]
public KeyboardButtonActionType?[] ButtonActions { get; set; }
/// <summary>
/// Поддерживается ли клавиатура ботов клиентом.
/// </summary>
[JsonProperty("keyboard")]
public bool Keyboard { get; set; }
/// <summary>
/// Поддерживается ли carousel клиентом.
/// </summary>
[JsonProperty("carousel")]
public bool Carousel { get; set; }
/// <summary>
/// Поддерживается ли inline-клавиатура ботов клиентом.
/// </summary>
[JsonProperty("inline_keyboard")]
public bool InlineKeyboard { get; set; }
/// <summary>
/// Id используемого языка.
/// </summary>
[JsonProperty("lang_id")]
public Language LangId { get; set; }
}