diff --git a/TeleSharp.TL/TLContext.cs b/TeleSharp.TL/TLContext.cs index db686aa..74b6cec 100644 --- a/TeleSharp.TL/TLContext.cs +++ b/TeleSharp.TL/TLContext.cs @@ -14,13 +14,20 @@ namespace TeleSharp.TL public static void Init() { - Types = new Dictionary(); - 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); - Types.Add(481674261, typeof(TLVector<>)); + try + { + Types = new Dictionary(); + 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); + Types.Add(481674261, typeof(TLVector<>)); + } + catch + { + + } } public static Type getType(int Constructor) {