You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logger.Debug($"Rendering dependencies for CRC id {this.controllerId} with ResourceType={resourceType}, Provider={provider}, ApplicationPath={applicationPath}. We have {this.Scripts.Count} scripts, {this.Stylesheets.Count} stylesheets and {this.Fonts.Count} fonts.");
201
209
varsortedList=newList<IResource>();
202
210
if(resourceTypeisResourceType.Font or ResourceType.All)
203
211
{
@@ -264,6 +272,15 @@ private List<T> AddResource<T>(List<T> resources, T resource)
Logger.Debug($"Adding resource {resource.ResolvedPath} to CRC id {this.controllerId} which currently has {resources.Count} resources");
276
+
277
+
if(this.hasBegunRendering)
278
+
{
279
+
Logger.Error($"Cannot add resource {resource.ResolvedPath} to CRC id {this.controllerId} because rendering has already begun");
280
+
281
+
////throw new InvalidOperationException("Cannot add resources after rendering has begun.");
282
+
}
283
+
267
284
resources.RemoveAll(l =>string.Equals(l.ResolvedPath,resource.ResolvedPath,StringComparison.OrdinalIgnoreCase));// remove any existing link with the same key (i.e. exactly the same resolved path)
0 commit comments