ToSic.SexyContent.SxcInstance.SxcInstance C# (CSharp) Method

SxcInstance() private method

private SxcInstance ( IContentBlock cb, DotNetNuke.Entities.Modules.ModuleInfo runtimeModuleInfo, string>.IEnumerable urlparams = null ) : System
cb IContentBlock
runtimeModuleInfo DotNetNuke.Entities.Modules.ModuleInfo
urlparams string>.IEnumerable
return System
        internal SxcInstance(IContentBlock cb, ModuleInfo runtimeModuleInfo, IEnumerable<KeyValuePair<string, string>> urlparams = null)
        {
            ContentBlock = cb;
            ModuleInfo = runtimeModuleInfo;

            // try to get url parameters, because we may need them later for view-switching and more
            Parameters = urlparams;
            //if (Parameters == null)
            //    Parameters = HttpContext.Current?.Request?.QueryString; // todo: reduce dependency on context-current...
            // Build up the environment. If we know the module context, then use permissions from there
            // modinfo is null in cases where things are not known yet, portalsettings are null in search-scenarios
            Environment.Permissions = (ModuleInfo != null) && (PortalSettings.Current != null)
                ? (IPermissions)new Permissions(ModuleInfo)
                : new Environment.None.Permissions();

            // url-override of view / data
            CheckTemplateOverrides();   // allow view change on apps
        }

Same methods

SxcInstance::SxcInstance ( IContentBlock cb, SxcInstance runtimeInstance ) : System