Example #1
0
 private static void EnsureInit()
 {
     if (_dispatcher == null)
     {
         _dispatcher = CrossDomain.CreateInMasterDomain <UdfDispatcher>();
     }
 }
Example #2
0
 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());
     }
 }
Example #3
0
        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);
            }
        }
Example #4
0
        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>();
 }