public static void Reload(IntPtr data_, IntPtr rm_, ref double maxValue_) { try { BaseMeasure measure = (BaseMeasure)GCHandle.FromIntPtr(data_).Target; measure.Reload(rm_, ref maxValue_); } catch (Exception ex) { _api.Log(LogType.Error, ex.Message); _api.Log(LogType.Error, ex.StackTrace); } }
public static double Update(IntPtr data_) { try { BaseMeasure measure = (BaseMeasure)GCHandle.FromIntPtr(data_).Target; return(measure.Update()); } catch (Exception ex) { _api.Log(LogType.Error, ex.Message); _api.Log(LogType.Error, ex.StackTrace); return(0); } }
public static void Finalize(IntPtr data_) { try { BaseMeasure measure = (BaseMeasure)GCHandle.FromIntPtr(data_).Target; measure.Dispose(); GCHandle.FromIntPtr(data_).Free(); } catch (Exception ex) { _api.Log(LogType.Error, ex.Message); _api.Log(LogType.Error, ex.StackTrace); } }
public static IntPtr GetString(IntPtr data_) { try { BaseMeasure measure = (BaseMeasure)GCHandle.FromIntPtr(data_).Target; return(Marshal.StringToHGlobalUni(measure.GetString())); } catch (Exception ex) { _api.Log(LogType.Error, ex.Message); _api.Log(LogType.Error, ex.StackTrace); return(Marshal.StringToHGlobalUni(string.Empty)); } }