private static void EnsureInit() { if (_dispatcher == null) { _dispatcher = CrossDomain.CreateInMasterDomain <UdfDispatcher>(); } }
public static void Log(Exception exc) { try { UdfDispatcher dispatcher = Get(); dispatcher.LogLocal(ToSerializable(exc)); } catch (Exception exc2) { Trace.WriteLine(exc.ToString()); Trace.WriteLine(exc2.ToString()); } }
public static object AMEE_CALC(string path, string dataItemUid, string amountType, string argName, string argValue) { try { var defaultValue = string.Format("Calc({0}->{1})", path, dataItemUid); var workbookName = GetCallingWorkbookName(); var res = UdfDispatcher.Get().Calculate(workbookName, path, dataItemUid, amountType, argName, argValue); return(res ?? defaultValue); } catch (Exception exc) { UdfDispatcher.Log(exc); return(exc.Message); } }
public static object AMEE_DATAITEM_VALUE(string path, string uid, string valuePath) { try { var defaultValue = string.Format("{0}->{1}", path, uid); var workbookName = GetCallingWorkbookName(); var res = UdfDispatcher.Get().GetDataItemValue(workbookName, path, uid, valuePath); return(res ?? defaultValue); } catch (Exception exc) { UdfDispatcher.Log(exc); return(exc.Message); } }
private static void EnsureInit() { if (_dispatcher == null) _dispatcher = CrossDomain.CreateInMasterDomain<UdfDispatcher>(); }