Exemple #1
0
 ILeoSetter IFluentSetter.NewInstance(bool strictMode)
 {
     if (_type.IsAbstract && _type.IsSealed)
     {
         return(LeoVisitorFactoryCore.CreateForStaticType(_type, _kind, LvMode.LITE, strictMode));
     }
     return(LeoVisitorFactoryCore.CreateForFutureInstance(_type, _kind, RpMode.NON_REPEATABLE, LvMode.LITE, strictMode));
 }
Exemple #2
0
        ILeoSetter IFluentSetter.InitialValues(IDictionary <string, object> initialValues, bool strictMode)
        {
            if (_type.IsAbstract && _type.IsSealed)
            {
                var visitor = LeoVisitorFactoryCore.CreateForStaticType(_type, _kind, LvMode.LITE, strictMode);
                visitor.SetValue(initialValues);
                return(visitor);
            }

            return(LeoVisitorFactoryCore.CreateForFutureInstance(_type, _kind, RpMode.NON_REPEATABLE, LvMode.LITE, strictMode, initialValues));
        }