Пример #1
0
        internal SxcInstance(IContentBlock cb,
                             IInstanceInfo envInstance,
                             IEnumerable <KeyValuePair <string, string> > urlparams = null,
                             Log parentLog = null)
        {
            Log          = new Log("Sxc.Instnc", parentLog, $"get SxcInstance for a:{cb?.AppId} cb:{cb?.ContentBlockId}");
            EnvFac       = Factory.Resolve <IEnvironmentFactory>();
            Environment  = EnvFac.Environment(parentLog);
            ContentBlock = cb;
            EnvInstance  = envInstance;

            // keep url parameters, because we may need them later for view-switching and more
            Parameters = urlparams;
        }
Пример #2
0
        internal BlockBuilder(IBlockBuilder rootBlockBuilder, IBlock cb,
                              IContainer container,
                              IEnumerable <KeyValuePair <string, string> > urlParams, ILog parentLog)
            : base("Sxc.BlkBld", parentLog, $"get CmsInstance for a:{cb?.AppId} cb:{cb?.ContentBlockId}")
        {
            EnvFac      = Factory.Resolve <IEnvironmentFactory>();
            Environment = EnvFac.Environment(parentLog);
            // the root block is the main container. If there is none yet, use this, as it will be the root
            RootBuilder = rootBlockBuilder ?? this;
            Block       = cb;
            Container   = container;

            // keep url parameters, because we may need them later for view-switching and more
            Parameters = urlParams;
        }