mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-01-20 15:30:25 +01:00
make example programs static
This commit is contained in:
parent
65a4b779c1
commit
bafe3c56bd
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue