updated readme badges

This commit is contained in:
Wizou 2021-08-13 17:32:07 +02:00
parent e01caba162
commit 70f9a61e17
3 changed files with 9 additions and 4 deletions

View file

@ -1,6 +1,8 @@
[![NuGet version](https://badge.fury.io/nu/WTelegramClient.svg)](https://badge.fury.io/nu/WTelegramClient)
[![Build Status](https://dev.azure.com/wiz0u/WTelegramClient/_apis/build/status/wiz0u.WTelegramClient?branchName=master)](https://dev.azure.com/wiz0u/WTelegramClient/_packaging?_a=package&feed=WTelegramClient&package=WTelegramClient&protocolType=NuGet)
[![Support Chat](https://img.shields.io/badge/Chat_with_us-on_Telegram-blue.svg?style=flat-square)](https://t.me/WTelegramClient)
[![NuGet version](https://img.shields.io/nuget/v/WTelegramClient)](https://www.nuget.org/packages/WTelegramClient/)
[![Dev nuget](https://img.shields.io/badge/dynamic/json?color=ffc040&label=Dev%20nuget&query=%24.versions%5B0%5D&url=https%3A%2F%2Fpkgs.dev.azure.com%2Fwiz0u%2F81bd92b7-0bb9-4701-b426-09090b27e037%2F_packaging%2F46ce0497-7803-4bd4-8c6c-030583e7c371%2Fnuget%2Fv3%2Fflat2%2Fwtelegramclient%2Findex.json)](https://dev.azure.com/wiz0u/WTelegramClient/_packaging?_a=package&feed=WTelegramClient&package=WTelegramClient&protocolType=NuGet)
[![Build Status](https://img.shields.io/azure-devops/build/wiz0u/WTelegramClient/7)](https://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7)
[![API Layer](https://img.shields.io/badge/API_Layer-121-blueviolet)](https://core.telegram.org/api/layers)
[![Support Chat](https://img.shields.io/badge/Chat_with_us-on_Telegram-0088cc)](https://t.me/WTelegramClient)
# WTelegramClient
### _Telegram client library written 100% in C# and .NET Core_

2
ci.yml
View file

@ -2,7 +2,7 @@ pr: none
trigger:
- master
name: 0.8.1-alpha.$(Rev:r)
name: 0.8.2-ci.$(Rev:r)
pool:
vmImage: ubuntu-latest

View file

@ -51,6 +51,7 @@
partial class UserBase
{
public abstract int ID { get; }
public abstract string DisplayName { get; }
protected abstract InputPeer ToInputPeer();
protected abstract InputUserBase ToInputUser();
public static implicit operator InputPeer(UserBase user) => user.ToInputPeer();
@ -59,12 +60,14 @@
partial class UserEmpty
{
public override int ID => id;
public override string DisplayName => null;
protected override InputPeer ToInputPeer() => InputPeer.Empty;
protected override InputUserBase ToInputUser() => InputUser.Empty;
}
partial class User
{
public override int ID => id;
public override string DisplayName => username != null ? '@' + username : last_name == null ? first_name : $"{first_name} {last_name}";
protected override InputPeer ToInputPeer() => new InputPeerUser { user_id = id, access_hash = access_hash };
protected override InputUserBase ToInputUser() => new InputUser { user_id = id, access_hash = access_hash };
}