public InlineScriptResource() { RenderPosition = ResourceRenderPosition.Body; }
public InlineScriptResource(ILocalResourceLocation resourceLocation, ResourceRenderPosition renderPosition = ResourceRenderPosition.Body) : base(renderPosition) { this.resourceLocation = resourceLocation; }
public InlineScriptResource() { RenderPosition = ResourceRenderPosition.Body; }
public InlineScriptResource(ResourceRenderPosition renderPosition = ResourceRenderPosition.Body) : base(renderPosition) { }
public InlineScriptResource(string code, ResourceRenderPosition renderPosition = ResourceRenderPosition.Body) : base(renderPosition) { this.Code = code; }
public LinkResourceBase(ResourceRenderPosition renderPosition, string mimeType, IResourceLocation location) : base(renderPosition) { this.Location = location; this.MimeType = mimeType; }
public LinkResourceBase(ResourceRenderPosition renderPosition, string mimeType) : base(renderPosition) { this.MimeType = mimeType; this.Location = null !; // TODO: deprecate this overload }
public ResourceBase(ResourceRenderPosition renderPosition) { this.RenderPosition = renderPosition; }
private bool IsAlreadyRendered(ResourceRenderPosition position) => position == ResourceRenderPosition.Head && HeadRendered || position == ResourceRenderPosition.Body && BodyRendered;
public static void RenderResources(IEnumerable <NamedResource> resources, IHtmlWriter writer, IDotvvmRequestContext context, ResourceRenderPosition position) { var writeDebugInfo = context.Configuration.Debug; foreach (var resource in resources) { if (resource.Resource.RenderPosition == position) { if (writeDebugInfo) { WriteResourceInfo(resource, writer, preload: false); } resource.RenderResourceCached(writer, context); } else if (position == ResourceRenderPosition.Head && resource.Resource.RenderPosition != ResourceRenderPosition.Head && resource.Resource is IPreloadResource preloadResource) { if (writeDebugInfo) { WriteResourceInfo(resource, writer, preload: true); } preloadResource.RenderPreloadLink(writer, context, resource.Name); } } }
public static void RenderResources(ResourceManager resourceManager, IHtmlWriter writer, IDotvvmRequestContext context, ResourceRenderPosition position) => RenderResources(resourceManager.GetNamedResourcesInOrder(), writer, context, position);
public LinkResourceBase(ResourceRenderPosition renderPosition, string mimeType) : base(renderPosition) { this.MimeType = mimeType; }