public GlobalConfigInternal(GlobalConfig config) { bool flag = config == null; if (flag) { throw new NullReferenceException("config is not defined"); } this.m_Ptr = GlobalConfigInternal.InternalCreate(); this.ThreadAwakeTimeout = config.ThreadAwakeTimeout; this.ReactorModel = (byte)config.ReactorModel; this.ReactorMaximumReceivedMessages = config.ReactorMaximumReceivedMessages; this.ReactorMaximumSentMessages = config.ReactorMaximumSentMessages; this.MaxPacketSize = config.MaxPacketSize; this.MaxHosts = config.MaxHosts; bool flag2 = config.ThreadPoolSize == 0 || config.ThreadPoolSize > 254; if (flag2) { throw new ArgumentOutOfRangeException("Worker thread pool size should be >= 1 && < 254 (for server only)"); } byte threadPoolSize = config.ThreadPoolSize; bool flag3 = config.ThreadPoolSize > 1; if (flag3) { Debug.LogWarning("Worker thread pool size can be > 1 only for server platforms: Win, OSX or Linux"); threadPoolSize = 1; } this.ThreadPoolSize = threadPoolSize; this.MinTimerTimeout = config.MinTimerTimeout; this.MaxTimerTimeout = config.MaxTimerTimeout; this.MinNetSimulatorTimeout = config.MinNetSimulatorTimeout; this.MaxNetSimulatorTimeout = config.MaxNetSimulatorTimeout; }
public void Dispose() { bool flag = this.m_Ptr != IntPtr.Zero; if (flag) { GlobalConfigInternal.InternalDestroy(this.m_Ptr); this.m_Ptr = IntPtr.Zero; } }
protected virtual void Dispose(bool disposing) { bool flag = this.m_Ptr != IntPtr.Zero; if (flag) { GlobalConfigInternal.InternalDestroy(this.m_Ptr); this.m_Ptr = IntPtr.Zero; } }
private static extern void InitWithParameters(GlobalConfigInternal config);
extern private static void InitializeClassWithConfig(GlobalConfigInternal config);
private static void InitWithParameters(GlobalConfigInternal config) { throw new NotImplementedException("なにこれ"); }