/// <summary> /// Gets a table within this table. /// </summary> /// <param name="name">Name of the table</param> /// <returns></returns> public ScriptTable GetTable(string name) { var scriptPtr = NativeScriptTableMethods.GetSubScriptTable(Handle, name); if (scriptPtr != IntPtr.Zero) { var scriptTable = ScriptTables.FirstOrDefault(x => x.Handle == scriptPtr); if (scriptTable != default(ScriptTable)) return scriptTable; scriptTable = new ScriptTable(scriptPtr); ScriptTables.Add(scriptTable); return scriptTable; } return null; }
internal static ScriptTable Get(IntPtr entityPtr) { if (ScriptTables == null) ScriptTables = new List<ScriptTable>(); var scriptPtr = NativeScriptTableMethods.GetScriptTable(entityPtr); if (scriptPtr != IntPtr.Zero) { var scriptTable = ScriptTables.FirstOrDefault(x => x.Handle == scriptPtr); if (scriptTable != default(ScriptTable)) return scriptTable; scriptTable = new ScriptTable(scriptPtr); ScriptTables.Add(scriptTable); return scriptTable; } return null; }