示例#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);
        }
示例#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
         });
     }
 }