Exemplo n.º 1
0
        private SourcePath <TViewModel, TType, TEnum> CreateSourcePath <TType>(TViewModel context, Func <TType, bool> predicate, TEnum enumTrue, Func <TViewModel, TType> compiled)
        {
            var srcPath = new SourcePath <TViewModel, TType, TEnum>(context)
            {
                PropertyCache = compiled,
                Predicate     = predicate,
                CaseIfTrue    = enumTrue,
            };

            return(srcPath);
        }
Exemplo n.º 2
0
 private void AddSourcePath <TType>(string name, SourcePath <TViewModel, TType, TEnum> srcPath)
 {
     if (_testDictionary.TryGetValue(name, out var value))
     {
         value.Add(srcPath);
     }
     else
     {
         _testDictionary.Add(name, new List <ISourcePath <TEnum> > {
             srcPath
         });
     }
 }