Ejemplo n.º 1
0
 public IEnumerable <IOption> GetOptions()
 {
     foreach (var id in (FunctionId[])Enum.GetValues(typeof(FunctionId)))
     {
         yield return(FunctionIdOptions.GetOption(id));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// let ones such as Perf setup to share loggingChecker func
        /// </summary>
        internal static Func <FunctionId, bool> GetLoggingChecker(IOptionService optionsService)
        {
            var functionIds       = Enum.GetValues(typeof(FunctionId)).Cast <FunctionId>();
            var functionIdOptions = functionIds.ToDictionary(
                id => id, id => optionsService.GetOption(FunctionIdOptions.GetOption(id)));

            Func <FunctionId, bool> loggingChecker = (functionId) => functionIdOptions[functionId];

            return(loggingChecker);
        }