コード例 #1
0
        public void PostProcessing(IGlobalContext context)
        {
            var numConfig = context.Resolve <NumberingConfig>();

            context.AddCss(
                CSS(numConfig.NumberingContainerCls,
                    numConfig.NumberingNumberCls));
        }
コード例 #2
0
        public void InjectCss(IGlobalContext context)
        {
            var cssRegistrator = context.Resolve <ICssRegistrator>();
            var data           = new CssData();
            var sb             = new StringBuilder();

            cssRegistrator.InsertCss(data);
            data.RenderInto(sb);
            context.AddCss(BaseCss);
            context.AddCss(sb.ToString());
        }
コード例 #3
0
        public void Resolve_Test()
        {
            var t = new Test();

            _globalContext.Resolve <Test>().Returns(t);
            _globalContext.ClearReceivedCalls();

            var t2 = _instance.Resolve <Test>();

            Assert.AreSame(t, t2);
            _globalContext.Received(1).Resolve <Test>();
        }
コード例 #4
0
 public T Resolve <T>() => _globalContext.Resolve <T>();