// Token: 0x060007D4 RID: 2004 RVA: 0x000066A2 File Offset: 0x000048A2 public override Class80 vmethod_4() { Class99 @class = new Class99(); @class.method_3(this.intptr_0); @class.method_1(base.method_0()); return(@class); }
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { if (reader.JsonToken_0 == JsonToken.Null) { return(null); } XmlNamespaceManager manager = new XmlNamespaceManager(new NameTable()); Interface11 interface2 = null; Interface10 interface3 = null; if (typeof(XObject).IsAssignableFrom(objectType)) { if ((objectType != typeof(XDocument)) && (objectType != typeof(XElement))) { throw new JsonSerializationException("XmlNodeConverter only supports deserializing XDocument or XElement."); } XDocument document = new XDocument(); interface2 = new Class99(document); interface3 = interface2; } if (typeof(System.Xml.XmlNode).IsAssignableFrom(objectType)) { if (objectType != typeof(XmlDocument)) { throw new JsonSerializationException("XmlNodeConverter only supports deserializing XmlDocuments"); } XmlDocument document2 = new XmlDocument(); interface2 = new Class93(document2); interface3 = interface2; } if ((interface2 == null) || (interface3 == null)) { throw new JsonSerializationException("Unexpected type when converting XML: " + objectType); } if (reader.JsonToken_0 != JsonToken.StartObject) { throw new JsonSerializationException("XmlNodeConverter can only convert JSON that begins with an object."); } if (!string.IsNullOrEmpty(this.DeserializeRootElementName)) { this.method_8(reader, interface2, interface3, this.DeserializeRootElementName, manager); } else { reader.Read(); this.method_15(reader, interface2, manager, interface3); } if (!(objectType == typeof(XElement))) { return(interface2.Object_0); } XElement element = (XElement)interface2.Interface12_0.Object_0; element.Remove(); return(element); }
// Token: 0x060028D1 RID: 10449 RVA: 0x0009A1EC File Offset: 0x000983EC private void method_7(object sender, EventArgs e) { if (this.LogMonitor != null) { this.LogMonitor.method_5(); this.LogMonitor = null; } Class99 connectSettings = Class110.Instance.ConnectSettings; Class96 actualToonTownVersionData = connectSettings.ActualToonTownVersionData; Class96 actualTestToonTownVersionData = connectSettings.ActualTestToonTownVersionData; Class96 spoofedToonTownVersionData = connectSettings.SpoofedToonTownVersionData; bool spoofedToonTownEnabled = connectSettings.SpoofedToonTownEnabled; lock (((ICollection)actualToonTownVersionData.FILES).SyncRoot) { lock (((ICollection)actualTestToonTownVersionData.FILES).SyncRoot) { lock (((ICollection)spoofedToonTownVersionData.FILES).SyncRoot) { foreach (Class309 @class in this.FileStates) { if ([email protected]) { switch (this.ServerType) { case Enum101.const_1: if (actualToonTownVersionData.FILES.ContainsKey(@class.FileName)) { actualToonTownVersionData.FILES[@class.FileName].ForceRecheck = true; } if (spoofedToonTownEnabled && spoofedToonTownVersionData.FILES.ContainsKey(@class.FileName)) { spoofedToonTownVersionData.FILES[@class.FileName].ForceRecheck = true; } break; case Enum101.const_2: if (actualTestToonTownVersionData.FILES.ContainsKey(@class.FileName)) { actualTestToonTownVersionData.FILES[@class.FileName].ForceRecheck = true; } break; } } } } } } base.Dispose(); }
internal static void smethod_0(Class857 A_0, Class99 A_1) { }
public static bool smethod_0(Enum101 type, string username, Dictionary <string, string> variables, out Class142 toontownWindow) { toontownWindow = null; Process process = null; bool result; try { Class96 @class; switch (type) { case Enum101.const_1: { Class99 connectSettings = Class110.Instance.ConnectSettings; if (connectSettings.SpoofedToonTownEnabled) { @class = Class110.Instance.ConnectSettings.SpoofedToonTownVersionData; Class80.smethod_1(Class80.string_0, connectSettings.PatchServer.PANDA_DOWNLOAD_URL); } else { @class = Class110.Instance.ConnectSettings.ActualToonTownVersionData; Class80.smethod_1(Class80.string_0, @class.Properties.PANDA_DOWNLOAD_URL); } Class80.smethod_1(Class80.string_1, Class80.string_19); Class80.smethod_1(Class80.string_2, Class80.string_25); break; } case Enum101.const_2: @class = Class110.Instance.ConnectSettings.ActualTestToonTownVersionData; Class80.smethod_1(Class80.string_0, @class.Properties.PANDA_DOWNLOAD_URL); Class80.smethod_1(Class80.string_1, Class80.string_20); Class80.smethod_1(Class80.string_2, Class80.string_24); break; default: throw new NotSupportedException(Class80.string_3); } Class80.smethod_1(Class80.string_4, string.Empty); Class80.smethod_1(Class80.string_5, string.Empty); Class80.smethod_1(Class80.string_6, Class80.string_22); Class80.smethod_1(Class80.string_7, Class80.string_23); Class80.smethod_1(Class80.string_8, string.Empty); Class80.smethod_1(Class80.string_9, Class80.string_21); Class80.smethod_1(Class80.string_10, @class.Properties.GAME_VERSION_TEXT); Class80.smethod_1(Class80.string_11, @class.Properties.GAME_SERVER); Class80.smethod_1(Class80.string_12, @class.Properties.ACCOUNT_SERVER); string key = Class80.string_13; if (Class80.action_0 == null) { Class80.action_0 = new Action <KeyValuePair <string, string> >(Class80.smethod_2); } variables.smethod_5(key, Class80.action_0); string key2 = Class80.string_14; if (Class80.action_1 == null) { Class80.action_1 = new Action <KeyValuePair <string, string> >(Class80.smethod_3); } variables.smethod_5(key2, Class80.action_1); string key3 = Class80.string_15; if (Class80.action_2 == null) { Class80.action_2 = new Action <KeyValuePair <string, string> >(Class80.smethod_4); } variables.smethod_5(key3, Class80.action_2); string key4 = Class80.string_16; if (Class80.action_3 == null) { Class80.action_3 = new Action <KeyValuePair <string, string> >(Class80.smethod_5); } variables.smethod_5(key4, Class80.action_3); string key5 = Class80.string_17; if (Class80.action_4 == null) { Class80.action_4 = new Action <KeyValuePair <string, string> >(Class80.smethod_6); } variables.smethod_5(key5, Class80.action_4); process = new Process(); process.EnableRaisingEvents = true; ProcessStartInfo processStartInfo = new ProcessStartInfo(); switch (type) { default: processStartInfo.WorkingDirectory = Class291.ToonTownOpenDataDirectory; processStartInfo.FileName = Path.Combine(Class291.ToonTownOpenDataDirectory, Class502.string_8); break; case Enum101.const_2: processStartInfo.WorkingDirectory = Class291.ToonTownTestDataDirectory; processStartInfo.FileName = Path.Combine(Class291.ToonTownTestDataDirectory, Class502.string_8); break; } processStartInfo.CreateNoWindow = true; processStartInfo.WindowStyle = ProcessWindowStyle.Hidden; processStartInfo.Arguments = string.Empty; processStartInfo.UseShellExecute = true; process.StartInfo = processStartInfo; toontownWindow = Class142.smethod_8(process, type, username, false); process.Start(); result = true; } catch (Exception ex) { if (process != null) { process.Dispose(); } ex.smethod_0(); result = false; } return(result); }
// Token: 0x060004E5 RID: 1253 RVA: 0x00028164 File Offset: 0x00026364 public static Class139 smethod_1(object object_0, Type type_0) { Class139 @class = object_0 as Class139; if (@class != null) { return(@class); } if (type_0 == null) { if (object_0 == null) { return(new Class166()); } type_0 = object_0.GetType(); } type_0 = Class102.smethod_1(type_0); if (type_0 == Class28.type_0) { @class = new Class166(); if (object_0 != null && object_0.GetType() != Class28.type_0) { @class.method_1(object_0.GetType()); } } else if (Class99.smethod_0 <Array>(type_0)) { @class = new Class140(); } else if (Class99.smethod_0 <string>(type_0)) { @class = new Class143(); } else if (Class99.smethod_0 <IntPtr>(type_0)) { @class = new Class146(); } else if (Class99.smethod_0 <UIntPtr>(type_0)) { @class = new Class157(); } else if (Class99.smethod_0 <ulong>(type_0)) { @class = new Class165(); } else if (Class99.smethod_0 <uint>(type_0)) { @class = new Class163(); } else if (Class99.smethod_0 <ushort>(type_0)) { @class = new Class159(); } else if (Class99.smethod_0 <long>(type_0)) { @class = new Class156(); } else if (Class99.smethod_0 <int>(type_0)) { @class = new Class145(); } else if (Class99.smethod_0 <short>(type_0)) { @class = new Class141(); } else if (Class99.smethod_0 <byte>(type_0)) { @class = new Class164(); } else if (Class99.smethod_0 <sbyte>(type_0)) { @class = new Class161(); } else if (Class99.smethod_0 <double>(type_0)) { @class = new Class158(); } else if (Class99.smethod_0 <float>(type_0)) { @class = new Class162(); } else if (Class99.smethod_0 <bool>(type_0)) { @class = new Class144(); } else if (Class99.smethod_0 <char>(type_0)) { @class = new Class155(); } else if (Class28.smethod_0(type_0)) { Class166 class2 = new Class166(); class2.method_1(type_0); @class = class2; } else { if (Class99.smethod_0 <Enum>(type_0)) { Enum enum_; if (object_0 == null) { if (type_0 == Class28.type_2) { enum_ = null; } else { enum_ = (Enum)Activator.CreateInstance(type_0); } } else if (type_0 == Class28.type_2 && object_0 is Enum) { enum_ = (Enum)object_0; } else { enum_ = (Enum)Enum.ToObject(type_0, object_0); } return(new Class160(enum_)); } if (Class99.smethod_0 <ValueType>(type_0)) { if (object_0 == null) { object object_; if (type_0 == Class28.type_3) { object_ = null; } else { object_ = Activator.CreateInstance(type_0); } @class = new Class154(object_); } else { if (object_0.GetType() != type_0) { try { object_0 = Convert.ChangeType(object_0, type_0); } catch { } } @class = new Class154(object_0); } return(@class); } @class = new Class166(); } if (object_0 != null) { @class.vmethod_1(object_0); } return(@class); }
// Token: 0x06000148 RID: 328 RVA: 0x0000F174 File Offset: 0x0000D374 public static Class80 smethod_1(object object_0, Type type_0) { Class80 @class = object_0 as Class80; if (@class != null) { return(@class); } if (type_0 == null) { if (object_0 == null) { return(new Class90()); } type_0 = object_0.GetType(); } type_0 = Class37.smethod_1(type_0); if (type_0 == Class175.type_0) { @class = new Class90(); if (object_0 != null && object_0.GetType() != Class175.type_0) { @class.method_1(object_0.GetType()); } } else if (Class29.smethod_0 <Array>(type_0)) { @class = new Class93(); } else if (Class29.smethod_0 <string>(type_0)) { @class = new Class96(); } else if (Class29.smethod_0 <IntPtr>(type_0)) { @class = new Class99(); } else if (Class29.smethod_0 <UIntPtr>(type_0)) { @class = new Class83(); } else if (Class29.smethod_0 <ulong>(type_0)) { @class = new Class89(); } else if (Class29.smethod_0 <uint>(type_0)) { @class = new Class92(); } else if (Class29.smethod_0 <ushort>(type_0)) { @class = new Class87(); } else if (Class29.smethod_0 <long>(type_0)) { @class = new Class82(); } else if (Class29.smethod_0 <int>(type_0)) { @class = new Class98(); } else if (Class29.smethod_0 <short>(type_0)) { @class = new Class94(); } else if (Class29.smethod_0 <byte>(type_0)) { @class = new Class88(); } else if (Class29.smethod_0 <sbyte>(type_0)) { @class = new Class85(); } else if (Class29.smethod_0 <double>(type_0)) { @class = new Class86(); } else if (Class29.smethod_0 <float>(type_0)) { @class = new Class91(); } else if (Class29.smethod_0 <bool>(type_0)) { @class = new Class97(); } else if (Class29.smethod_0 <char>(type_0)) { @class = new Class81(); } else if (Class175.smethod_0(type_0)) { Class90 class2 = new Class90(); class2.method_1(type_0); @class = class2; } else { if (Class29.smethod_0 <Enum>(type_0)) { Enum enum_; if (object_0 == null) { if (type_0 == Class175.type_2) { enum_ = null; } else { enum_ = (Enum)Activator.CreateInstance(type_0); } } else if (type_0 == Class175.type_2 && object_0 is Enum) { enum_ = (Enum)object_0; } else { enum_ = (Enum)Enum.ToObject(type_0, object_0); } return(new Class84(enum_)); } if (Class29.smethod_0 <ValueType>(type_0)) { if (object_0 == null) { object object_; if (type_0 == Class175.type_3) { object_ = null; } else { object_ = Activator.CreateInstance(type_0); } @class = new Class107(object_); } else { if (object_0.GetType() != type_0) { try { object_0 = Convert.ChangeType(object_0, type_0); } catch { } } @class = new Class107(object_0); } return(@class); } @class = new Class90(); } if (object_0 != null) { @class.vmethod_1(object_0); } return(@class); }