Rename TeleSharp.TL->TgSharp.TL, fixing base types (4/5)

These types are not auto-generated so they needed to be fixed
manually.
This commit is contained in:
Andres G. Aragoneses 2020-09-11 00:42:20 +08:00
parent 2c0352e38d
commit 350d28c7f8
6 changed files with 7 additions and 12 deletions

View file

@ -5,8 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL
namespace TgSharp.TL
{
public class ObjectUtils
{

View file

@ -5,8 +5,7 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL
namespace TgSharp.TL
{
public static class TLContext
{
@ -16,7 +15,7 @@ namespace TeleSharp.TL
{
Types = new Dictionary<int, Type>();
Types = (from t in Assembly.GetExecutingAssembly().GetTypes()
where t.IsClass && t.Namespace.StartsWith("TeleSharp.TL")
where t.IsClass && t.Namespace.StartsWith(typeof(TLContext).Namespace)
where t.IsSubclassOf(typeof(TLObject))
where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null
select t).ToDictionary(x => ((TLObjectAttribute)x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x);

View file

@ -5,8 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL
namespace TgSharp.TL
{
public abstract class TLMethod : TLObject
{

View file

@ -5,8 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL
namespace TgSharp.TL
{
public class TLObjectAttribute : Attribute
{

View file

@ -6,8 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL
namespace TgSharp.TL
{
public class IntegerUtil
{

View file

@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TeleSharp.TL
namespace TgSharp.TL
{
public class TLVector<T> : TLObject, IList<T>
{