internal bool runTogether(TKey key, out TValue1 v1, out TValue2 v2) { try { return(getAllValues.Invoke(key, out v1, out v2)); } catch (Exception) { return(ResetAll(key, out v1, out v2)); } }
internal bool runTogether(TKey key, out DateTime timestamp, out TValue1 v1, out TValue2 v2) { try { bool result = getAllValues.Invoke(key, out v1, out v2); timestamp = _funDateTime.Invoke(key); return(result); } catch (Exception) { return(FactoryWrapper <TKey, DateTime, TValue1, TValue2> .ResetAll(key, out timestamp, out v1, out v2)); } }
static void GenerateArcTable(GetValueDelegate getValueHdl) { StringBuilder logSb = new StringBuilder(); logSb.Append("\t\tprotected static short[] valueTable = new short[] {"); for (int i = 0; i <= 1000; ++i) { if (i % 30 == 0) { logSb.Append("\n\t\t\t"); } float floatValue = getValueHdl.Invoke(i / 1000f); int intValue = (int)(floatValue * Mathf.Rad2Deg); logSb.Append(intValue); if (i != 1000) { logSb.Append(",\t\t"); } } logSb.Append("};\n"); Debug.LogError(logSb.ToString()); }
public object GetValue(object obj) { return(getValue.Invoke(obj)); }