Exemplo n.º 1
0
        public AppContent Init(string appName, ILog parentLog)
        {
            Log.LinkTo(parentLog);

            // if app-path specified, use that app, otherwise use from context
            Context = _ctxResolver.AppNameRouteBlock(appName);

            return(this);
        }
Exemplo n.º 2
0
        public T Init(int appId, string contentType, Guid itemGuid, string field, bool usePortalRoot, ILog parentLog)

        {
            Log.LinkTo(parentLog);
            var context = appId > 0 ? _ctxResolver.BlockOrApp(appId) : _ctxResolver.AppNameRouteBlock(null);
            var logCall = Log.Call <T>($"app: {context.AppState.Show()}, type: {contentType}, itemGuid: {itemGuid}, field: {field}, portalRoot: {usePortalRoot}");

            AdamContext.Init(context, contentType, field, itemGuid, usePortalRoot, Log);
            return(logCall(null, this as T));
        }