public HttpResourceInfo([NotNull] UriString uri, Stream response, MimeType format) : base(uri, ImmutableSession.Empty.Set(Use <IResourceNamespace> .Namespace, x => x.Format, format)) { _response = response; }
public InMemoryResourceInfo(UriString uri, MimeType format, Stream data, IImmutableSession metadata = default) : base(uri, metadata ?? ImmutableSession.Empty.Set(Use <IResourceNamespace> .Namespace, x => x.Format, format)) { _data = data ?? throw new ArgumentNullException(nameof(data)); }
public EmbeddedFileInfo(string uri, MimeType format, Func <Stream> getManifestResourceStream) : base(uri, ImmutableSession.Empty.Set(Use <IResourceNamespace> .Namespace, x => x.Format, format)) { _getManifestResourceStream = getManifestResourceStream; }
public PhysicalFileInfo([NotNull] UriString uri, MimeType format) : base(uri, ImmutableSession.Empty.Set(Use <IResourceNamespace> .Namespace, x => x.Format, format)) { }
public static async Task <IResourceInfo> GetFileAsync(this IResourceProvider resourceProvider, string path, MimeType format, IImmutableSession metadata = default) { return(await resourceProvider.GetAsync(CreateUri(path), metadata.ThisOrEmpty().Set(Use <IResourceNamespace> .Namespace, x => x.Format, format))); }