Skip to content

Commit

Permalink
Merge pull request #2805 from 2sic/develop
Browse files Browse the repository at this point in the history
Rename ValueGetOnce to GetOnce 14.07
  • Loading branch information
iJungleboy authored Jun 29, 2022
2 parents 711bae5 + 3b05d89 commit 4dab0d5
Show file tree
Hide file tree
Showing 34 changed files with 86 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public DnnDynamicCodeRoot(Dependencies dependencies): base(dependencies, DnnCons
/// Dnn context with module, page, portal etc.
/// </summary>
public IDnnContext Dnn => _dnn.Get(GetService<IDnnContext>);
private readonly ValueGetOnce<IDnnContext> _dnn = new ValueGetOnce<IDnnContext>();
private readonly GetOnce<IDnnContext> _dnn = new GetOnce<IDnnContext>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ protected Razor14()
public TModel Model => !(_DynCodeRoot is IDynamicCode<TModel, TServiceKit> root) ? default : root.Model;

public TServiceKit Kit => _kit.Get(() => _DynCodeRoot.GetKit<TServiceKit>());
private readonly ValueGetOnce<TServiceKit> _kit = new ValueGetOnce<TServiceKit>();
private readonly GetOnce<TServiceKit> _kit = new GetOnce<TServiceKit>();
}
}
2 changes: 1 addition & 1 deletion Src/Dnn/ToSic.Sxc.Dnn.Razor/Engines/Razor/HtmlHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ public IHtmlString Partial(string path, params object[] data)

private bool ThrowPartialError => _throwPartialError.Get(() =>
_features.IsEnabled(RazorThrowPartial.NameId) || _isSystemAdmin && _features.IsEnabled(RenderThrowPartialSystemAdmin.NameId));
private readonly ValueGetOnce<bool> _throwPartialError = new ValueGetOnce<bool>();
private readonly GetOnce<bool> _throwPartialError = new GetOnce<bool>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected Api14(string logSuffix) : base(logSuffix) { }
public TModel Model => !(_DynCodeRoot is IDynamicCode<TModel, TServiceKit> root) ? default : root.Model;

public TServiceKit Kit => _kit.Get(() => _DynCodeRoot.GetKit<TServiceKit>());
private readonly ValueGetOnce<TServiceKit> _kit = new ValueGetOnce<TServiceKit>();
private readonly GetOnce<TServiceKit> _kit = new GetOnce<TServiceKit>();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void Initialize(HttpControllerContext controllerContext)
protected IContextResolver SharedContextResolver;

[PrivateApi] protected IBlock GetBlock() => _blockOfRequest.Get(() => GetService<DnnGetBlock>().GetCmsBlock(Request, Log));
private readonly ValueGetOnce<IBlock> _blockOfRequest = new ValueGetOnce<IBlock>();
private readonly GetOnce<IBlock> _blockOfRequest = new GetOnce<IBlock>();

}
}
6 changes: 3 additions & 3 deletions Src/Dnn/ToSic.Sxc.Dnn/View.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public partial class View : PortalModuleBase, IActionable
/// which runs before page-load
/// </summary>
private IBlock Block => _blockGetOnce.Get(() => LogTimer.DoInTimer(() => GetService<IModuleAndBlockBuilder>().Init(Log).GetBlock(ModuleConfiguration, null)));
private readonly ValueGetOnce<IBlock> _blockGetOnce = new ValueGetOnce<IBlock>();
private readonly GetOnce<IBlock> _blockGetOnce = new GetOnce<IBlock>();

private ILog Log { get; } = new Log("Sxc.View");

protected LogCall LogTimer => _logTimer.Get(() => Log.Fn(message: $"Page:{TabId} '{Page?.Title}', Module:{ModuleId} '{ModuleConfiguration.ModuleTitle}'"));
private readonly ValueGetOnce<LogCall> _logTimer = new ValueGetOnce<LogCall>();
private readonly GetOnce<LogCall> _logTimer = new GetOnce<LogCall>();

/// <summary>
/// Page Load event
Expand Down Expand Up @@ -163,6 +163,6 @@ private IRenderResult RenderViewAndGatherJsCssSpecs()


protected IOutputCache OutputCache => _oc.Get(() => GetService<IOutputCache>().Init(Log).Init(ModuleId, TabId, Block));
private readonly ValueGetOnce<IOutputCache> _oc = new ValueGetOnce<IOutputCache>();
private readonly GetOnce<IOutputCache> _oc = new GetOnce<IOutputCache>();
}
}
6 changes: 3 additions & 3 deletions Src/Oqtane/ToSic.Sxc.Oqt.Server/Blocks/OqtSxcViewBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ public OqtViewResultsDto Prepare(Alias alias, Site site, Page page, Module modul
_contextResolverForLookUps.AttachRealBlock(() => block);
return block;
}));
private readonly ValueGetOnce<IBlock> _blockGetOnce = new();
private readonly GetOnce<IBlock> _blockGetOnce = new();

protected LogCall LogTimer => _logTimer.Get(() => Log.Fn(message: $"Page:{Page?.PageId} '{Page?.Name}', Module:{Module?.ModuleId} '{Module?.Title}'"));
private readonly ValueGetOnce<LogCall> _logTimer = new();
private readonly GetOnce<LogCall> _logTimer = new();


protected IOutputCache OutputCache => _oc.Get(() => _outputCache.Init(Log).Init(Module.ModuleId, Page?.PageId ?? 0, Block));
private readonly ValueGetOnce<IOutputCache> _oc = new();
private readonly GetOnce<IOutputCache> _oc = new();

#endregion
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class Api14<TModel, TServiceKit> : Api12, IDynamicCode<TModel, T
public TModel Model => _DynCodeRoot is not IDynamicCode<TModel, TServiceKit> root ? default : root.Model;

public TServiceKit Kit => _kit.Get(() => _DynCodeRoot.GetKit<TServiceKit>());
private readonly ValueGetOnce<TServiceKit> _kit = new();
private readonly GetOnce<TServiceKit> _kit = new();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public abstract class Razor14<TModel, TServiceKit>: Razor12<TModel>, IRazor14<TM
where TServiceKit : ServiceKit
{
public TServiceKit Kit => _kit.Get(() => _DynCodeRoot.GetKit<TServiceKit>());
private readonly ValueGetOnce<TServiceKit> _kit = new();
private readonly GetOnce<TServiceKit> _kit = new();
}
}
4 changes: 2 additions & 2 deletions Src/Sxc/ToSic.Sxc/Blocks/BlockBuilder_Render.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class BlockBuilder

[PrivateApi]
public IRenderingHelper RenderingHelper => _rendHelp.Get(() => _deps.RenderHelpGen.New.Init(Block, Log));
private readonly ValueGetOnce<IRenderingHelper> _rendHelp = new ValueGetOnce<IRenderingHelper>();
private readonly GetOnce<IRenderingHelper> _rendHelp = new GetOnce<IRenderingHelper>();

public IRenderResult Run(bool topLevel)
{
Expand Down Expand Up @@ -200,7 +200,7 @@ public IRenderResult Run(bool topLevel)
/// license ok state
/// </summary>
protected bool LicenseOk => _licenseOk.Get(() => _deps.LicenseService.Value.HaveValidLicense);
private readonly ValueGetOnce<bool> _licenseOk = new ValueGetOnce<bool>();
private readonly GetOnce<bool> _licenseOk = new GetOnce<bool>();

private string GenerateWarningMsgIfLicenseNotOk()
{
Expand Down
2 changes: 1 addition & 1 deletion Src/Sxc/ToSic.Sxc/Blocks/RenderResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class RenderResult : HybridHtmlString, IRenderResult
public string Html { get; set; }

public int Size => _size.Get(() => Html?.Length ?? 0);
private readonly ValueGetOnce<int> _size = new ValueGetOnce<int>();
private readonly GetOnce<int> _size = new GetOnce<int>();

/// <inheritdoc />
public bool CanCache { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Src/Sxc/ToSic.Sxc/Code/DynamicCodeRootTT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ protected DynamicCodeRoot(Dependencies dependencies, string logPrefix) : base(de
//private readonly ValueGetOnce<TModel> _mOnce = new ValueGetOnce<TModel>();

public TServiceKit Kit => _kit.Get(GetService<TServiceKit>);
private readonly ValueGetOnce<TServiceKit> _kit = new ValueGetOnce<TServiceKit>();
private readonly GetOnce<TServiceKit> _kit = new GetOnce<TServiceKit>();
}
}
2 changes: 1 addition & 1 deletion Src/Sxc/ToSic.Sxc/Code/DynamicCodeRoot_As.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public IEnumerable<dynamic> AsList(object list)

internal AdamManager AdamManager => _admMng.Get(() => GetService<AdamManager>()
.Init(ContextForAdamManager(), CompatibilityLevel, Log));
private readonly ValueGetOnce<AdamManager> _admMng = new ValueGetOnce<AdamManager>();
private readonly GetOnce<AdamManager> _admMng = new GetOnce<AdamManager>();

/// <summary>
/// Special helper - if the DynamicCode is generated by the service or used in a WebApi there is no block, but we can figure out the context.
Expand Down
10 changes: 5 additions & 5 deletions Src/Sxc/ToSic.Sxc/Context/CmsContext/CmsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Lazy<ICmsSite> cmsSiteLazy
private readonly Lazy<IPage> _pageLazy;

internal IContextOfSite CtxSite => _ctxSite.Get(() => CtxBlockOrNull ?? _initialContext);
private readonly ValueGetOnce<IContextOfSite> _ctxSite = new ValueGetOnce<IContextOfSite>();
private readonly GetOnce<IContextOfSite> _ctxSite = new GetOnce<IContextOfSite>();

private readonly IAppStates _appStates;
private readonly Lazy<ICmsSite> _cmsSiteLazy;
Expand All @@ -57,21 +57,21 @@ Lazy<ICmsSite> cmsSiteLazy
internal DynamicEntityDependencies DEDeps => (CodeRoot as DynamicCodeRoot)?.DynamicEntityDependencies;

private AppState SiteAppState => _siteAppState.Get(() => _appStates.GetPrimaryApp(CtxSite.Site.ZoneId, Log));
private readonly ValueGetOnce<AppState> _siteAppState = new ValueGetOnce<AppState>();
private readonly GetOnce<AppState> _siteAppState = new GetOnce<AppState>();


private IBlock RealBlockOrNull => _realBlock.Get(() => CodeRoot?.Block);
private readonly ValueGetOnce<IBlock> _realBlock = new ValueGetOnce<IBlock>();
private readonly GetOnce<IBlock> _realBlock = new GetOnce<IBlock>();

internal IContextOfBlock CtxBlockOrNull => _ctxBlock.Get(() => CodeRoot?.Block?.Context);
private readonly ValueGetOnce<IContextOfBlock> _ctxBlock = new ValueGetOnce<IContextOfBlock>();
private readonly GetOnce<IContextOfBlock> _ctxBlock = new GetOnce<IContextOfBlock>();

#endregion

public ICmsPlatform Platform { get; }

public ICmsSite Site => _site.Get(() => _cmsSiteLazy.Value.Init(this, SiteAppState));
private readonly ValueGetOnce<ICmsSite> _site = new ValueGetOnce<ICmsSite>();
private readonly GetOnce<ICmsSite> _site = new GetOnce<ICmsSite>();

public ICmsPage Page => _page ?? (_page = new CmsPage(this, SiteAppState, _pageLazy));
private ICmsPage _page;
Expand Down
4 changes: 2 additions & 2 deletions Src/Sxc/ToSic.Sxc/Context/CmsContext/CmsContextPartBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ protected void Init(CmsContext parent, T contents)
}

public IDynamicMetadata Metadata => _dynMeta.Get(() => new DynamicMetadata((this as IHasMetadata).Metadata, null, _parent.DEDeps));
private readonly ValueGetOnce<IDynamicMetadata> _dynMeta = new ValueGetOnce<IDynamicMetadata>();
private readonly GetOnce<IDynamicMetadata> _dynMeta = new GetOnce<IDynamicMetadata>();

IMetadataOf IHasMetadata.Metadata => _md.Get(GetMetadataOf);
private readonly ValueGetOnce<IMetadataOf> _md = new ValueGetOnce<IMetadataOf>();
private readonly GetOnce<IMetadataOf> _md = new GetOnce<IMetadataOf>();

protected abstract IMetadataOf GetMetadataOf();

Expand Down
2 changes: 1 addition & 1 deletion Src/Sxc/ToSic.Sxc/Context/CmsContext/CmsSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ICmsSite Init(CmsContext parent, AppState appState)
public string UrlRoot => _contents.UrlRoot ?? string.Empty;

public IApp App => _app.Get(() => _siteAppLazy.Value.Init(_appState, null, null));
private readonly ValueGetOnce<IApp> _app = new ValueGetOnce<IApp>();
private readonly GetOnce<IApp> _app = new GetOnce<IApp>();

protected override IMetadataOf GetMetadataOf()
=> ExtendWithRecommendations(_appState.GetMetadataOf(TargetTypes.Site, Id, Url));
Expand Down
2 changes: 1 addition & 1 deletion Src/Sxc/ToSic.Sxc/Custom.Hybrid/Advanced/Code14_TT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class Code14<TModel, TServiceKit>: DynamicCode, IDynamicCode14<T
public TModel Model => !(_DynCodeRoot is IDynamicCode<TModel, TServiceKit> root) ? default : root.Model;

public TServiceKit Kit => _kit.Get(() => _DynCodeRoot.GetKit<TServiceKit>());
private readonly ValueGetOnce<TServiceKit> _kit = new ValueGetOnce<TServiceKit>();
private readonly GetOnce<TServiceKit> _kit = new GetOnce<TServiceKit>();

/// <inheritdoc />
public dynamic Resources => _DynCodeRoot?.Resources;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ internal static IDynamicEntity SubDynEntityOrNull(IEntity contents, DynamicEntit
#endregion

protected ILog LogOrNull => _logOrNull.Get(() => _Dependencies.LogOrNull?.SubLogOrNull("DynEnt", Debug));
private readonly ValueGetOnce<ILog> _logOrNull = new ValueGetOnce<ILog>();
private readonly GetOnce<ILog> _logOrNull = new GetOnce<ILog>();

}
}
10 changes: 5 additions & 5 deletions Src/Sxc/ToSic.Sxc/Data/Field/DynamicField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ internal DynamicField(IDynamicEntity parent, string name)

/// <inheritdoc />
public dynamic Raw => _raw.Get(() => Parent.Get(Name, convertLinks: false));
private readonly ValueGetOnce<dynamic> _raw = new ValueGetOnce<dynamic>();
private readonly GetOnce<dynamic> _raw = new GetOnce<dynamic>();


/// <inheritdoc />
public dynamic Value => _value.Get(() => Parent.Get(Name, convertLinks: true));
private readonly ValueGetOnce<dynamic> _value = new ValueGetOnce<dynamic>();
private readonly GetOnce<dynamic> _value = new GetOnce<dynamic>();

/// <inheritdoc />
public string Url => Value as string;


public IDynamicMetadata Metadata => _dynMeta.Get(() => new DynamicMetadata(MetadataOfItem, Parent.Entity, Parent._Dependencies));
private readonly ValueGetOnce<IDynamicMetadata> _dynMeta = new ValueGetOnce<IDynamicMetadata>();
private readonly GetOnce<IDynamicMetadata> _dynMeta = new GetOnce<IDynamicMetadata>();


/// <inheritdoc />
Expand All @@ -43,7 +43,7 @@ internal DynamicField(IDynamicEntity parent, string name)
var app = Parent._Dependencies?.BlockOrNull?.Context?.AppState;
return app?.GetMetadataOf(TargetTypes.CmsItem, valString, "");
});
private readonly ValueGetOnce<IMetadataOf> _itemMd = new ValueGetOnce<IMetadataOf>();
private readonly GetOnce<IMetadataOf> _itemMd = new GetOnce<IMetadataOf>();



Expand All @@ -52,7 +52,7 @@ internal DynamicField(IDynamicEntity parent, string name)
var decItem = MetadataOfItem?.FirstOrDefaultOfType(ImageDecorator.TypeName);
return decItem != null ? new ImageDecorator(decItem) : null;
});
private readonly ValueGetOnce<ImageDecorator> _imgDec2 = new ValueGetOnce<ImageDecorator>();
private readonly GetOnce<ImageDecorator> _imgDec2 = new GetOnce<ImageDecorator>();

IMetadataOf IHasMetadata.Metadata => MetadataOfItem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public partial class ToolbarBuilder


private ObjectToUrl O2U => _o2u.Get(() => new ObjectToUrl());
private readonly ValueGetOnce<ObjectToUrl> _o2u = new ValueGetOnce<ObjectToUrl>();
private readonly GetOnce<ObjectToUrl> _o2u = new GetOnce<ObjectToUrl>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public override string ToolbarAsTag
=> ToolbarTagTemplate.Replace(ToolbarTagPlaceholder, ToolbarAttributes(JsonToolbarNodeName));

protected override string ToolbarJson => _toolbarJson.Get(ToolbarV10Json);
private readonly ValueGetOnce<string> _toolbarJson = new ValueGetOnce<string>();
private readonly GetOnce<string> _toolbarJson = new GetOnce<string>();

public override string ToolbarAsAttributes() => ToolbarAttributes(ToolbarAttributeName);

Expand Down
4 changes: 2 additions & 2 deletions Src/Sxc/ToSic.Sxc/Edit/Toolbar/Rules/ToolbarRuleForEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ private void SetPropsToSerialize(bool defaultSerialize, string[] opposite)


protected IEntity TargetEntity => _entity.Get(() => Target as IEntity ?? (Target as IEntityWrapper)?.Entity);
private readonly ValueGetOnce<IEntity> _entity = new ValueGetOnce<IEntity>();
private readonly GetOnce<IEntity> _entity = new GetOnce<IEntity>();

internal EntityEditInfo EditInfo => _editInfo.Get(() => new EntityEditInfo(TargetEntity));
private readonly ValueGetOnce<EntityEditInfo> _editInfo = new ValueGetOnce<EntityEditInfo>();
private readonly GetOnce<EntityEditInfo> _editInfo = new GetOnce<EntityEditInfo>();

protected override string DecoratorTypeName => TargetEntity?.Type?.Name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override string GeneratedUiParams()
var decoTypeName = DecoratorTypeName;
return decoTypeName.HasValue() ? DecoHelper?.GetDecorator(Context, decoTypeName ?? "", Command) : null;
});
private readonly ValueGetOnce<ToolbarButtonDecorator> _decorator = new ValueGetOnce<ToolbarButtonDecorator>();
private readonly GetOnce<ToolbarButtonDecorator> _decorator = new GetOnce<ToolbarButtonDecorator>();
private string UiParams() => Decorator?.AllRules();

#endregion
Expand Down
2 changes: 1 addition & 1 deletion Src/Sxc/ToSic.Sxc/Images/ImageService/ImageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void ConnectToRoot(IDynamicCodeRoot codeRoot)
internal IEditService EditOrNull => _codeRootOrNull?.Edit;

internal IToolbarService ToolbarOrNull => _toolbarSvc.Get(() => _codeRootOrNull?.GetService<IToolbarService>());
private readonly ValueGetOnce<IToolbarService> _toolbarSvc = new ValueGetOnce<IToolbarService>();
private readonly GetOnce<IToolbarService> _toolbarSvc = new GetOnce<IToolbarService>();

#endregion

Expand Down
16 changes: 8 additions & 8 deletions Src/Sxc/ToSic.Sxc/Images/Responsive/ResponsiveBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected ResponsiveBase(ImageService imgService, ResponsiveParams callParams, s
Log.A(ImgService.Debug, $"{nameof(ThisResize)}: " + t?.Dump());
return t;
});
private readonly ValueGetOnce<OneResize> _thisResize = new ValueGetOnce<OneResize>();
private readonly GetOnce<OneResize> _thisResize = new GetOnce<OneResize>();


internal IResizeSettings Settings => Call.Settings;
Expand Down Expand Up @@ -75,7 +75,7 @@ public virtual Img Img
private Img _imgTag;

public ITag Tag => _tag.Get(GetTagWithToolbar);
private readonly ValueGetOnce<ITag> _tag = new ValueGetOnce<ITag>();
private readonly GetOnce<ITag> _tag = new GetOnce<ITag>();

protected virtual ITag GetOutermostTag() => Img;

Expand Down Expand Up @@ -106,12 +106,12 @@ private ITag GetTagWithToolbar()

/// <inheritdoc />
public string Alt => _alt.Get(() => Call.ImgAlt ?? Call.Field?.ImageDecoratorOrNull?.Description);
private readonly ValueGetOnce<string> _alt = new ValueGetOnce<string>();
private readonly GetOnce<string> _alt = new GetOnce<string>();


/// <inheritdoc />
public string Class => _imgClass.Get(ClassGenerator);
private readonly ValueGetOnce<string> _imgClass = new ValueGetOnce<string>();
private readonly GetOnce<string> _imgClass = new GetOnce<string>();
private string ClassGenerator()
{
var wrapLog = Log.Fn<string>(ImgService.Debug);
Expand All @@ -135,7 +135,7 @@ private string ClassGenerator()

/// <inheritdoc />
public string SrcSet => _srcSet.Get(SrcSetGenerator);
private readonly ValueGetOnce<string> _srcSet = new ValueGetOnce<string>();
private readonly GetOnce<string> _srcSet = new GetOnce<string>();
private string SrcSetGenerator()
{
var isEnabled = ImgService.Features.IsEnabled(ImageServiceMultipleSizes.NameId);
Expand All @@ -151,7 +151,7 @@ private string SrcSetGenerator()

/// <inheritdoc />
public string Width => _width.Get(WidthGenerator);
private readonly ValueGetOnce<string> _width = new ValueGetOnce<string>();
private readonly GetOnce<string> _width = new GetOnce<string>();
private string WidthGenerator()
{
var setWidth = ThisResize.Recipe?.SetWidth;
Expand All @@ -166,7 +166,7 @@ private string WidthGenerator()

/// <inheritdoc />
public string Height => _height.Get(HeightGenerator);
private readonly ValueGetOnce<string> _height = new ValueGetOnce<string>();
private readonly GetOnce<string> _height = new GetOnce<string>();
private string HeightGenerator()
{
var setHeight = ThisResize.Recipe?.SetHeight;
Expand All @@ -179,7 +179,7 @@ private string HeightGenerator()


public string Sizes => _sizes.Get(SizesGenerator);
private readonly ValueGetOnce<string> _sizes = new ValueGetOnce<string>();
private readonly GetOnce<string> _sizes = new GetOnce<string>();
private string SizesGenerator()
{
var wrapLog = Log.Fn<string>(ImgService.Debug);
Expand Down
2 changes: 1 addition & 1 deletion Src/Sxc/ToSic.Sxc/Images/Responsive/ResponsiveImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal ResponsiveImage(ImageService imgService, ResponsiveParams callParams) :
if (!string.IsNullOrEmpty(Sizes)) img.Sizes(Sizes);
return img;
});
private readonly ValueGetOnce<Img> _img2 = new ValueGetOnce<Img>();
private readonly GetOnce<Img> _img2 = new GetOnce<Img>();

}
}
Loading

0 comments on commit 4dab0d5

Please sign in to comment.