Exemplo n.º 1
0
        public void SsqExcelFunctionTest(string ssqFunction, string wkn_isin_ticker)
        {
            IEnumerable <SsqExcelFunction> ssqExcelFunctions = SsqLoader.GetExcelFunctions()
                                                               .Where(f => ((ExcelFunctionAttribute)f.ExcelFunctionAttribute).Name.Equals(ssqFunction));
            var    ssqExcelFuntion = ssqExcelFunctions.Single();
            object actual          = ssqExcelFuntion.Delegate.DynamicInvoke(wkn_isin_ticker);

            Assert.IsType <decimal>(actual);
        }
Exemplo n.º 2
0
        public void ReRegisterFunctions(IRibbonControl control)
        {
            ExcelAsyncUtil.QueueAsMacro(() =>
            {
                SsqLoader.Load();

                FfeAddIn ffeAddIn = new FfeAddIn();
                ffeAddIn.RegisterFunctions();
                ffeAddIn.RegisterDelegates();
            });
        }
Exemplo n.º 3
0
 public void RegisterDelegates()
 {
     try
     {
         SsqLoader.GetExcelFunctions()
         .RegisterFunctions();
     }
     catch (Exception ex)
     {
         Log.Error("Exception while registering SSQ Excel functions. Message: {@ExceptionMessage}", ex.Message);
     }
 }
Exemplo n.º 4
0
        private IEnumerable <string> GetFfeFunctionNames()
        {
            /*functionNames = GetExecutingAssembly().GetTypes()
             *                                    .SelectMany(t => t.GetMethods())
             *                                    .Where(m => m.GetCustomAttributes(typeof(ExcelFunctionAttribute), false).Length > 0)
             *                                    .Select(mi => mi.Name);*/
            // FFE functions
            functionNames = ExcelRegistration.GetExcelFunctions()
                            .Where(x => x.FunctionAttribute.Category.Equals("FFE"))
                            .Select(f => f.FunctionAttribute.Name);
            // + SSQ UDFs
            functionNames = functionNames.Union(SsqLoader.GetUdfs().Select(udf => udf.Value.QueryInformation.Name));

            return(functionNames);
        }
Exemplo n.º 5
0
 public void SsqLoaderTest()
 {
     Assert.NotEmpty(SsqLoader.GetExcelFunctions());
 }