byte[] ISimulationDataScriptStateStorageInterface.this[UUID regionID, UUID primID, UUID itemID] { get { byte[] state; if (!ScriptStates.TryGetValue(regionID, primID, itemID, out state)) { throw new KeyNotFoundException(); } return(state); } set { using (var connection = new MySqlConnection(m_ConnectionString)) { connection.Open(); var p = new Dictionary <string, object> { ["RegionID"] = regionID, ["PrimID"] = primID, ["ItemID"] = itemID, ["ScriptState"] = value }; MySQLUtilities.ReplaceInto(connection, "scriptstates", p); } } }
byte[] ISimulationDataScriptStateStorageInterface.this[UUID regionID, UUID primID, UUID itemID] { get { byte[] state; if (!ScriptStates.TryGetValue(regionID, primID, itemID, out state)) { throw new KeyNotFoundException(); } return(state); } set { using (var connection = new NpgsqlConnection(m_ConnectionString)) { connection.Open(); var p = new Dictionary <string, object> { ["RegionID"] = regionID, ["PrimID"] = primID, ["ItemID"] = itemID, ["ScriptState"] = value }; connection.ReplaceInto("scriptstates", p, new string[] { "RegionID", "PrimID", "ItemID" }, m_EnableOnConflict); } } }
byte[] ISimulationDataScriptStateStorageInterface.this[UUID regionID, UUID primID, UUID itemID] { get { byte[] state; if (!ScriptStates.TryGetValue(regionID, primID, itemID, out state)) { throw new KeyNotFoundException(); } return(state); } set { m_ScriptStateData[regionID][GenScriptStateKey(primID, itemID)] = value; } }
private UPnPTestStates GetEquivalentUPnPTestState(ScriptStates state) { switch (state) { case ScriptStates.Normal: return(UPnPTestStates.Ready); case ScriptStates.Skipped: return(UPnPTestStates.Failed); case ScriptStates.Pass: return(UPnPTestStates.Pass); case ScriptStates.Warning: return(UPnPTestStates.Warn); case ScriptStates.Failure: return(UPnPTestStates.Failed); default: return(UPnPTestStates.Ready); } }
private UPnPTestStates GetEquivalentUPnPTestState(ScriptStates state) { switch(state) { case ScriptStates.Normal: return UPnPTestStates.Ready; case ScriptStates.Skipped: return UPnPTestStates.Failed; case ScriptStates.Pass: return UPnPTestStates.Pass; case ScriptStates.Warning: return UPnPTestStates.Warn; case ScriptStates.Failure: return UPnPTestStates.Failed; default: return UPnPTestStates.Ready; } }