mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-07 23:45:09 +00:00
apply resharper's code style
This commit is contained in:
parent
1697db9d7f
commit
7fad829dd2
776 changed files with 14393 additions and 24502 deletions
|
|
@ -2,10 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using TeleSharp.TL;
|
||||
namespace TeleSharp.TL
|
||||
{
|
||||
public static class TLContext
|
||||
|
|
@ -16,15 +13,17 @@ 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.IsSubclassOf(typeof(TLObject))
|
||||
where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null
|
||||
select t).ToDictionary(x => ((TLObjectAttribute)x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x);
|
||||
where t.IsClass && t.Namespace.StartsWith("TeleSharp.TL")
|
||||
where t.IsSubclassOf(typeof(TLObject))
|
||||
where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null
|
||||
select t).ToDictionary(
|
||||
x => ((TLObjectAttribute) x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x);
|
||||
Types.Add(481674261, typeof(TLVector<>));
|
||||
}
|
||||
|
||||
public static Type getType(int Constructor)
|
||||
{
|
||||
return Types[Constructor];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue