make example programs static

This commit is contained in:
Wizou 2021-12-03 10:16:01 +01:00
parent 65a4b779c1
commit bafe3c56bd
4 changed files with 6 additions and 6 deletions

View file

@ -8,7 +8,7 @@ using TL;
namespace WTelegramClientTest
{
class Program_CollectAccessHash
static class Program_CollectAccessHash
{
private const string StateFilename = "SavedState.json";
private const long DurovID = 1006503122; // known ID for Durov's Channel

View file

@ -7,7 +7,7 @@ using TL;
namespace WTelegramClientTest
{
class Program_DownloadSavedMedia
static class Program_DownloadSavedMedia
{
// go to Project Properties > Debug > Environment variables and add at least these: api_id, api_hash, phone_number
static async Task Main(string[] args)

View file

@ -5,7 +5,7 @@ using TL;
namespace WTelegramClientTest
{
class Program_GetAllChats
static class Program_GetAllChats
{
// This code is similar to what you should have obtained if you followed the README introduction
// I've just added a few comments to explain further what's going on

View file

@ -6,7 +6,7 @@ using TL;
namespace WTelegramClientTest
{
class Program_ListenUpdates
static class Program_ListenUpdates
{
// go to Project Properties > Debug > Environment variables and add at least these: api_id, api_hash, phone_number
static async Task Main(string[] _)
@ -45,8 +45,8 @@ namespace WTelegramClientTest
private static void Client_Update(IObject arg)
{
if (arg is not UpdatesBase updates) return;
foreach(var (id, user) in updates.Users) _users[id] = user;
foreach(var (id, chat) in updates.Chats) _chats[id] = chat;
foreach (var (id, user) in updates.Users) _users[id] = user;
foreach (var (id, chat) in updates.Chats) _chats[id] = chat;
foreach (var update in updates.UpdateList)
switch (update)
{