Exemplo n.º 1
0
            public WorkContextImpl(ILifetimeScope lifetimeScope)
            {
                _contextDictonary = new Dictionary <string, object>();
                CurrentUser       = new StubUser();
                var ci = new ContentItem();

                ci.Weld(new StubSite());
                CurrentSite    = ci.As <ISite>();
                _lifetimeScope = lifetimeScope;

                if (_initMethod != null)
                {
                    _initMethod(this);
                }
            }
            public WorkContextImpl(ILifetimeScope lifetimeScope)
            {
                _contextDictonary = new Dictionary <string, object>();
                CurrentUser       = new StubUser();
                var ci = new ContentItem();

                ci.Weld(new StubSite());
                CurrentSite    = ci.As <ISite>();
                _lifetimeScope = lifetimeScope;

                if (_initMethod != null)
                {
                    _initMethod(this);
                }

                _contextDictonary["CurrentTimeZone"] = TimeZoneInfo.Local;
                _contextDictonary["CurrentCulture"]  = "en-US";
            }