Beispiel #1
0
        public static TestContext getTestContext(DateTimeOffset? viewDate = null, IConditionalEvaluator evaluator = null, ICustomElementProvider provider = null)
        {
            DateTimeOffset realDate = viewDate ?? DateTimeOffset.Now;

            var db = getDataContext();

            var trrepo = new TreeRepository(db);
            var blrepo = new StreamedBlobRepository(db);
            var tpsbrepo = new TreePathStreamedBlobRepository(db, blrepo);

            return new TestContext(new ContentEngine(trrepo, blrepo, tpsbrepo, realDate, evaluator, provider), trrepo, blrepo, tpsbrepo);
        }
 public RenderingSystemContext(ISystemContext systemContext, DateTimeOffset? viewDate = null, IConditionalEvaluator evaluator = null, ICustomElementProvider provider = null, bool throwOnError = false, bool injectErrorComments = true, bool injectWarningComments = false)
 {
     this.SystemContext = systemContext;
     this.Engine = new ContentEngine(
         systemContext.trrepo,
         systemContext.blrepo,
         systemContext.tpsbrepo,
         viewDate ?? DateTimeOffset.Now,
         evaluator,
         provider,
         throwOnError,
         injectErrorComments,
         injectWarningComments
     );
 }
 public DefaultFalseConditionalEvaluator(EitherAndOr andOr, IConditionalEvaluator next = null)
 {
     this.Next = next;
     this.AndOr = andOr;
 }
 public ConditionalElementProvider(IConditionalEvaluator evaluator, ICustomElementProvider next = null)
 {
     this.Next = next;
     this.evaluator = evaluator;
 }