internal CspOptions Build() { this.options.Defaults = this.Defaults.Sources; this.options.Scripts = this.Scripts.Sources; this.options.Styles = this.Styles.Sources; this.options.Images = this.Images.Sources; this.options.Fonts = this.Fonts.Sources; this.options.Media = this.Media.Sources; return(this.options); }
/// <summary> /// Enhance a CspDirectiveBuilder with methods that support "src" directives. /// </summary> /// <param name="cspDirectiveBuilder">The internal directive builder.</param> /// <param name="nonce">The nonce generated by the server</param> public static CspSourceDirectiveBuilder ForSources(this CspDirectiveBuilder cspDirectiveBuilder, string nonce) { return(new CspSourceDirectiveBuilder(cspDirectiveBuilder, nonce)); }
internal CspSourceDirectiveBuilder(CspDirectiveBuilder internalBuilder, string nonce) { _internalBuilder = internalBuilder; _nonce = nonce; }