diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..9a21928 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "xmldoc2markdown": { + "version": "2.1.1", + "commands": [ + "xmldoc2md" + ] + } + } +} \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a082a01..cd8c92d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,7 @@ version: 2 updates: - package-ecosystem: "nuget" - directory: "/" + directory: "/src" schedule: interval: "weekly" labels: diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4359a2c --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "bierner.github-markdown-preview" + ] +} \ No newline at end of file diff --git a/Proffer.sln b/Proffer.sln index 1a36860..1140f31 100644 --- a/Proffer.sln +++ b/Proffer.sln @@ -4,12 +4,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 16.0.31205.134 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8B67DB72-5CC8-441F-9EFF-8F41BB637DA8}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + src\Directory.Build.targets = src\Directory.Build.targets + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "items", "items", "{4835CA7C-4548-46EC-BE45-F716251461DD}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig .gitignore = .gitignore coverlet.runsettings = coverlet.runsettings + .config\dotnet-tools.json = .config\dotnet-tools.json gitversion.yml = gitversion.yml LICENSE = LICENSE README.md = README.md @@ -81,9 +86,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Templating.Mustache EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Email.Tests", "tests\Proffer.Email.Tests\Proffer.Email.Tests.csproj", "{912A7766-6FA4-49E2-8256-BAF3181BA1CA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proffer.Email.InMemory.Tests", "tests\Proffer.Email.InMemory.Tests\Proffer.Email.InMemory.Tests.csproj", "{0A6C1CB3-809F-4930-AE97-AAC77CEF957A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Email.InMemory.Tests", "tests\Proffer.Email.InMemory.Tests\Proffer.Email.InMemory.Tests.csproj", "{0A6C1CB3-809F-4930-AE97-AAC77CEF957A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proffer.Email.Smtp.Tests", "tests\Proffer.Email.Smtp.Tests\Proffer.Email.Smtp.Tests.csproj", "{4677285D-19A7-4B38-B056-1D946A51E47C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Proffer.Email.Smtp.Tests", "tests\Proffer.Email.Smtp.Tests\Proffer.Email.Smtp.Tests.csproj", "{4677285D-19A7-4B38-B056-1D946A51E47C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..f152691 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +getproffer.net \ No newline at end of file diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..595e3be --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "github-pages", group: :jekyll_plugins +gem "jekyll-include-cache", group: :jekyll_plugins \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..80dac8e --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,286 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your entire site, values +# which you are expected to set up once and rarely need to edit after that. +# For technical reasons, this file is *NOT* reloaded automatically when you use +# `jekyll serve`. If you change this file, please restart the server process. + +# Theme Settings +# https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/#installing-the-theme + +remote_theme: "mmistakes/minimal-mistakes" +minimal_mistakes_skin: "dark" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise" +main_color: "#5c2d91" + +# Site Settings +locale: "en-US" +title: "Proffer" +title_separator: "-" +subtitle: "Version 0.1.0" +name: &name "Adrien Siffermann" +description: &description ".NET Core basic abstractions to configuration-driven providers" +url: https://getproffer.net +repository: asiffermann/proffer +teaser: /assets/images/banner.png +logo: /assets/images/logo.png +breadcrumbs: false +words_per_minute: 200 +comments: + provider: # false (default), "disqus", "discourse", "facebook", "staticman", "staticman_v2", "utterances", "custom" + disqus: + shortname: # https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname- + discourse: + server: # https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963 , e.g.: meta.discourse.org + facebook: + # https://developers.facebook.com/docs/plugins/comments + appid: + num_posts: # 5 (default) + colorscheme: # "light" (default), "dark" + utterances: + theme: # "github-light" (default), "github-dark" + issue_term: # "pathname" (default) + staticman: + branch: # "master" + endpoint: # "https://{your Staticman v3 API}/v3/entry/github/" +reCaptcha: + siteKey: + secret: +atom_feed: + path: # blank (default) uses feed.xml + hide: # true, false (default) +search: true # true, false (default) +search_full_content: # true, false (default) +search_provider: # lunr (default), algolia, google +algolia: + application_id: # YOUR_APPLICATION_ID + index_name: # YOUR_INDEX_NAME + search_only_api_key: # YOUR_SEARCH_ONLY_API_KEY + powered_by: # true (default), false +google: + search_engine_id: # YOUR_SEARCH_ENGINE_ID + instant_search: # false (default), true +# SEO Related +google_site_verification: +bing_site_verification: +yandex_site_verification: +naver_site_verification: + +# Social Sharing +twitter: + username: &twitter proffer_dotnet + card: summary_large_image +facebook: + username: + app_id: + publisher: +og_image: /assets/images/banner.png # Open Graph/Twitter default site image +# For specifying social profiles +# - https://developers.google.com/structured-data/customize/social-profiles +social: + type: Organization + name: Proffer + links: + - https://github.com/asiffermann/proffer + - https://twitter.com/proffer_dotnet + +# Analytics +analytics: + provider: false # false (default), "google", "google-universal", "google-gtag", "custom" + google: + tracking_id: + anonymize_ip: # true, false (default) + +# Site Author +author: *name + +# Site Footer +footer: + links: + - label: "Twitter" + icon: "fab fa-fw fa-twitter-square" + url: https://twitter.com/proffer_dotnet + - label: "GitHub" + icon: "fab fa-fw fa-github" + url: https://github.com/asiffermann/proffer + +# Reading Files +include: + - .htaccess + - _pages +exclude: + - "*.sublime-project" + - "*.sublime-workspace" + - vendor + - .asset-cache + - .bundle + - .jekyll-assets-cache + - .sass-cache + - assets/js/plugins + - assets/js/_main.js + - assets/js/vendor + - Capfile + - CHANGELOG + - config + - Gemfile + - Gruntfile.js + - gulpfile.js + - LICENSE + - log + - node_modules + - package.json + - package-lock.json + - Rakefile + - README + - tmp + - /docs # ignore Minimal Mistakes /docs + - /test # ignore Minimal Mistakes /test +keep_files: + - .git + - .svn +encoding: "utf-8" +markdown_ext: "markdown,mkdown,mkdn,mkd,md" + +# Conversion +markdown: kramdown +highlighter: rouge +lsi: false +excerpt_separator: "\n\n" +incremental: false + +# Markdown Processing +kramdown: + input: GFM + hard_wrap: false + auto_ids: true + footnote_nr: 1 + entity_output: as_char + toc_levels: 1..6 + smart_quotes: lsquo,rsquo,ldquo,rdquo + enable_coderay: false + +# Sass/SCSS +sass: + sass_dir: _sass + style: compressed # https://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style + +# Outputting +permalink: /:categories/:title/ +paginate: 5 # amount of posts to show +paginate_path: /page:num/ +timezone: Europe/Paris # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + +# Plugins (previously gems:) +plugins: + - jekyll-paginate + - jekyll-sitemap + - jekyll-gist + - jekyll-feed + - jekyll-include-cache + +# mimic GitHub Pages with --safe +whitelist: + - jekyll-paginate + - jekyll-sitemap + - jekyll-gist + - jekyll-feed + - jekyll-include-cache + +# Archives +# Type +# - GitHub Pages compatible archive pages built with Liquid ~> type: liquid (default) +# - Jekyll Archives plugin archive pages ~> type: jekyll-archives +# Path (examples) +# - Archive page should exist at path when using Liquid method or you can +# expect broken links (especially with breadcrumbs enabled) +# - /tags/my-awesome-tag/index.html ~> path: /tags/ +# - /categories/my-awesome-category/index.html ~> path: /categories/ +# - /my-awesome-category/index.html ~> path: / +category_archive: + type: liquid + path: /categories +tag_archive: + type: liquid + path: /tags +# https://github.com/jekyll/jekyll-archives +# jekyll-archives: +# enabled: +# - categories +# - tags +# layouts: +# category: archive-taxonomy +# tag: archive-taxonomy +# permalinks: +# category: /categories/:name/ +# tag: /tags/:name/ + +# HTML Compression +# - https://jch.penibelst.de/ +compress_html: + clippings: all + ignore: + envs: development + +titles_from_headings: + enabled: true + strip_title: true + +# Collections +collections: + docs: + output: true + permalink: /:collection/:path + +# Defaults +defaults: + - scope: + path: "" + values: + header: + og_image: /assets/images/banner.png + + # _posts + - scope: + path: "" + type: posts + values: + layout: single + author_profile: true + read_time: true + comments: # true + share: true + related: true + show_date: true + classes: wide + header: + overlay_color: "#5c2d91" + # _pages + - scope: + path: "_pages" + type: pages + values: + layout: single + author_profile: false + # api + - scope: + path: "api" + type: pages + values: + layout: single + author_profile: false + toc: true + sidebar: + nav: "api" + # _docs + - scope: + path: "" + type: docs + values: + layout: single + read_time: false + author_profile: false + share: false + comments: false + classes: wide + excerpt_separator: + sidebar: + nav: "docs" diff --git a/docs/_data/authors.yml b/docs/_data/authors.yml new file mode 100644 index 0000000..5e00019 --- /dev/null +++ b/docs/_data/authors.yml @@ -0,0 +1,14 @@ +Adrien Siffermann: + name: "Adrien Siffermann" + avatar: https://avatars.githubusercontent.com/u/12293953?v=4 + bio: "I'm a freelance full stack developer. I love Cloud and Web development, automation and ALM. Cultural all-rounder, science addict and bon vivant above all!" + location: "Paris, France" + email: adrien@siffermann.me + links: + - label: "Twitter" + icon: "fab fa-fw fa-twitter-square" + url: "https://twitter.com/asiffermann" + - label: "GitHub" + icon: "fab fa-fw fa-github" + url: "https://github.com/asiffermann" + diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml new file mode 100644 index 0000000..cd5fd5c --- /dev/null +++ b/docs/_data/navigation.yml @@ -0,0 +1,88 @@ +main: + - title: "Getting started" + url: /docs/getting-started + - title: "About" + url: /docs/about + - title: "News" + url: /categories/news + - title: "Use cases" + url: /use-cases + - title: "API documentation" + url: /api + +# documentation links +docs: + - title: About + url: /docs/about + - title: Getting Started + url: /docs/getting-started + - title: Core libraries + children: + - title: "Core" + url: /docs/core + - title: "Azure" + url: /docs/core/azure + - title: Storage + url: /docs/storage + children: + - title: "FileSystem" + url: /docs/storage/filesystem + - title: "FileSystem Server" + url: /docs/storage/filesystem/server + - title: "FileSystem Json Properties" + url: /docs/storage/filesystem/properties/json + - title: "Azure Blobs" + url: /docs/storage/azure/blobs + - title: Templating + url: /docs/templating + children: + - title: "HandleBars" + url: /docs/templating/handlebars + - title: "Mustache" + url: /docs/templating/mustache + - title: Email + url: /docs/email + children: + - title: "In memory" + url: /docs/email/in-memory + - title: "SMTP" + url: /docs/email/smtp + - title: "SendGrid" + url: /docs/email/SendGrid + +# api documentation links +api: + - title: API + url: /api + - title: Core libraries + url: /api/core + children: + - title: "Azure" + url: /api/core/azure + - title: Storage + url: /api/storage + children: + - title: "FileSystem" + url: /api/storage/filesystem + - title: "FileSystem Server" + url: /api/storage/filesystem/server + - title: "FileSystem Json Properties" + url: /api/storage/filesystem/properties/json + - title: "Azure Blobs" + url: /api/storage/azure/blobs + - title: Templating + url: /api/templating + children: + - title: "HandleBars" + url: /api/templating/handlebars + - title: "Mustache" + url: /api/templating/mustache + - title: Email + url: /api/email + children: + - title: "In memory" + url: /api/email/in-memory + - title: "SMTP" + url: /api/email/smtp + - title: "SendGrid" + url: /api/email/SendGrid diff --git a/docs/_docs/01-about.md b/docs/_docs/01-about.md new file mode 100644 index 0000000..4c1580a --- /dev/null +++ b/docs/_docs/01-about.md @@ -0,0 +1,4 @@ +--- +title: About +permalink: /docs/about +--- \ No newline at end of file diff --git a/docs/_docs/02-getting-started.md b/docs/_docs/02-getting-started.md new file mode 100644 index 0000000..dbab8a0 --- /dev/null +++ b/docs/_docs/02-getting-started.md @@ -0,0 +1,4 @@ +--- +title: Getting started +permalink: /docs/getting-started +--- \ No newline at end of file diff --git a/docs/_docs/03-core.md b/docs/_docs/03-core.md new file mode 100644 index 0000000..4295975 --- /dev/null +++ b/docs/_docs/03-core.md @@ -0,0 +1,17 @@ +--- +title: "Core libraries" +permalink: /docs/core +--- + +Those libraries provide common abstractions for any Proffer project or provider. + +There is not much here until the configuration will be shared across all different projects. + +## Projects + +- [Proffer.Azure](/core/azure) + +## API documentation + +- [Proffer](/api/core) +- [Proffer.Azure](/api/core/azure) diff --git a/docs/_docs/04-core.azure.md b/docs/_docs/04-core.azure.md new file mode 100644 index 0000000..3e2b3bc --- /dev/null +++ b/docs/_docs/04-core.azure.md @@ -0,0 +1,12 @@ +--- +title: "Core Azure library" +permalink: /docs/core/azure +--- + +This library provides common abstractions for any Proffer provider connected to Azure Storage (like [Proffer.Storage.Azure.Blobs](/docs/storage/azure/blobs) or Proffer.Events.Azure.Queues). + +There is not much here until the configuration will be shared across all different projects. + +## API documentation + +- [Proffer.Azure](/api/core/azure) \ No newline at end of file diff --git a/docs/_includes/head/custom.html b/docs/_includes/head/custom.html new file mode 100644 index 0000000..b57e5c5 --- /dev/null +++ b/docs/_includes/head/custom.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/docs/_pages/404.md b/docs/_pages/404.md new file mode 100644 index 0000000..76736f1 --- /dev/null +++ b/docs/_pages/404.md @@ -0,0 +1,8 @@ +--- +title: "Page Not Found" +excerpt: "Page not found. Your pixels are in another canvas." +sitemap: false +permalink: /404.html +--- + +Sorry, but the page you were trying to view does not exist. \ No newline at end of file diff --git a/docs/_pages/category-archive.md b/docs/_pages/category-archive.md new file mode 100644 index 0000000..d960f0f --- /dev/null +++ b/docs/_pages/category-archive.md @@ -0,0 +1,7 @@ +--- +title: "Posts by Category" +permalink: /categories/ +layout: categories +author_profile: false +classes: wide +--- \ No newline at end of file diff --git a/docs/_pages/home.md b/docs/_pages/home.md new file mode 100644 index 0000000..4d67510 --- /dev/null +++ b/docs/_pages/home.md @@ -0,0 +1,46 @@ +--- +layout: splash +permalink: / +hidden: true +header: + overlay_color: "#5c2d91" + actions: + - label: " Install now" + url: "/docs/getting-started" + - label: " View on GitHub" + url: "https://github.com/asiffermann/proffer" +excerpt: > + .NET Core basic abstractions to configuration-driven providers
+ Latest release v0.1.0 +feature_row: + - image_path: /assets/images/banner.png + alt: "core" + title: "Core libraries" + excerpt: "Provide common abstractions for any Proffer project or provider." + url: "/docs/core" + btn_class: "btn--primary" + btn_label: "Learn more" + - image_path: /assets/images/banner.png + alt: "storage" + title: "Storage" + excerpt: "File Storage abstractions with providers." + url: "/docs/storage" + btn_class: "btn--primary" + btn_label: "Learn more" + - image_path: /assets/images/banner.png + alt: "templating" + title: "Templating" + excerpt: "Templating abstractions with providers." + url: "/docs/templating" + btn_class: "btn--primary" + btn_label: "Learn more" + - image_path: /assets/images/banner.png + alt: "email" + title: "Email" + excerpt: "Templated email sending abstractions with providers." + url: "/docs/email" + btn_class: "btn--primary" + btn_label: "Learn more" +--- + +{% include feature_row %} \ No newline at end of file diff --git a/docs/_pages/news.md b/docs/_pages/news.md new file mode 100644 index 0000000..94b2d34 --- /dev/null +++ b/docs/_pages/news.md @@ -0,0 +1,6 @@ +--- +title: News +layout: category +permalink: /categories/news +taxonomy: News +--- diff --git a/docs/_pages/posts.md b/docs/_pages/posts.md new file mode 100644 index 0000000..0a0dab1 --- /dev/null +++ b/docs/_pages/posts.md @@ -0,0 +1,7 @@ +--- +title: "Posts" +permalink: /posts +layout: posts +author_profile: false +classes: wide +--- \ No newline at end of file diff --git a/docs/_pages/tag-archive.md b/docs/_pages/tag-archive.md new file mode 100644 index 0000000..043f387 --- /dev/null +++ b/docs/_pages/tag-archive.md @@ -0,0 +1,7 @@ +--- +title: "Posts by Tag" +permalink: /tags/ +layout: tags +author_profile: false +classes: wide +--- \ No newline at end of file diff --git a/docs/_pages/use-cases.md b/docs/_pages/use-cases.md new file mode 100644 index 0000000..d33084f --- /dev/null +++ b/docs/_pages/use-cases.md @@ -0,0 +1,5 @@ +--- +permalink: /use-cases/ +--- + +# Use cases \ No newline at end of file diff --git a/docs/_posts/2021-05-22-hello-proffer.md b/docs/_posts/2021-05-22-hello-proffer.md new file mode 100644 index 0000000..fb1ba0c --- /dev/null +++ b/docs/_posts/2021-05-22-hello-proffer.md @@ -0,0 +1,14 @@ +--- +title: "Hello Proffer!" +excerpt: "A fresh new start for GeekLearning libraries" +date: 2021-05-22 +categories: + - News +tags: + - Core + - Storage + - Templating + - Email +--- + +New release ... diff --git a/docs/_sass/custom.scss b/docs/_sass/custom.scss new file mode 100644 index 0000000..d0cd169 --- /dev/null +++ b/docs/_sass/custom.scss @@ -0,0 +1,3 @@ +a:hover, a:focus { + font-weight: normal; +} diff --git a/docs/android-chrome-192x192.png b/docs/android-chrome-192x192.png new file mode 100644 index 0000000..0fe0ce4 Binary files /dev/null and b/docs/android-chrome-192x192.png differ diff --git a/docs/android-chrome-384x384.png b/docs/android-chrome-384x384.png new file mode 100644 index 0000000..b9bb636 Binary files /dev/null and b/docs/android-chrome-384x384.png differ diff --git a/docs/api/core/azure/index.md b/docs/api/core/azure/index.md new file mode 100644 index 0000000..b44ef9d --- /dev/null +++ b/docs/api/core/azure/index.md @@ -0,0 +1,5 @@ +# Proffer.Azure + +## Proffer.Azure.Configuration + +[IAzureStorageOptions](./proffer.azure.configuration.iazurestorageoptions.md) diff --git a/docs/api/core/azure/proffer.azure.configuration.iazurestorageoptions.md b/docs/api/core/azure/proffer.azure.configuration.iazurestorageoptions.md new file mode 100644 index 0000000..8095c24 --- /dev/null +++ b/docs/api/core/azure/proffer.azure.configuration.iazurestorageoptions.md @@ -0,0 +1,35 @@ +# IAzureStorageOptions + +Namespace: Proffer.Azure.Configuration + +Proffer options pointing to an Azure Storage account. + +```csharp +public interface IAzureStorageOptions +``` + +## Properties + +### **ConnectionString** + +Gets or sets the connection string. + +```csharp +public abstract string ConnectionString { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionStringName** + +Gets or sets the name of the connection string to reference. + +```csharp +public abstract string ConnectionStringName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/core/index.md b/docs/api/core/index.md new file mode 100644 index 0000000..66d0662 --- /dev/null +++ b/docs/api/core/index.md @@ -0,0 +1,17 @@ +# Proffer + +## Proffer + +[EqualityComparerBase<T>](./proffer.equalitycomparerbase-1.md) + +## Proffer.Configuration + +[INamedElementOptions](./proffer.configuration.inamedelementoptions.md) + +[IOptionError](./proffer.configuration.ioptionerror.md) + +[IProviderOptions](./proffer.configuration.iprovideroptions.md) + +[OptionError](./proffer.configuration.optionerror.md) + +[ProviderOptions](./proffer.configuration.provideroptions.md) diff --git a/docs/api/core/proffer.configuration.inamedelementoptions.md b/docs/api/core/proffer.configuration.inamedelementoptions.md new file mode 100644 index 0000000..9e83b8d --- /dev/null +++ b/docs/api/core/proffer.configuration.inamedelementoptions.md @@ -0,0 +1,23 @@ +# INamedElementOptions + +Namespace: Proffer.Configuration + +A named element from the options (provider or scope). + +```csharp +public interface INamedElementOptions +``` + +## Properties + +### **Name** + +Gets or sets the name. + +```csharp +public abstract string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/core/proffer.configuration.ioptionerror.md b/docs/api/core/proffer.configuration.ioptionerror.md new file mode 100644 index 0000000..f946538 --- /dev/null +++ b/docs/api/core/proffer.configuration.ioptionerror.md @@ -0,0 +1,35 @@ +# IOptionError + +Namespace: Proffer.Configuration + +An error reported from the options validation. + +```csharp +public interface IOptionError +``` + +## Properties + +### **PropertyName** + +Gets the name of the faulted property. + +```csharp +public abstract string PropertyName { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ErrorMessage** + +Gets the error message. + +```csharp +public abstract string ErrorMessage { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/core/proffer.configuration.iprovideroptions.md b/docs/api/core/proffer.configuration.iprovideroptions.md new file mode 100644 index 0000000..f87353d --- /dev/null +++ b/docs/api/core/proffer.configuration.iprovideroptions.md @@ -0,0 +1,25 @@ +# IProviderOptions + +Namespace: Proffer.Configuration + +Options of a provider. + +```csharp +public interface IProviderOptions : INamedElementOptions +``` + +Implements [INamedElementOptions](./proffer.configuration.inamedelementoptions.md) + +## Properties + +### **Type** + +Gets the type. + +```csharp +public abstract string Type { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/core/proffer.configuration.optionerror.md b/docs/api/core/proffer.configuration.optionerror.md new file mode 100644 index 0000000..2959b70 --- /dev/null +++ b/docs/api/core/proffer.configuration.optionerror.md @@ -0,0 +1,48 @@ +# OptionError + +Namespace: Proffer.Configuration + +A generic error reported from the options validation. + +```csharp +public class OptionError : IOptionError +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [OptionError](./proffer.configuration.optionerror.md)
+Implements [IOptionError](./proffer.configuration.ioptionerror.md) + +## Properties + +### **PropertyName** + +Gets the name of the faulted property. + +```csharp +public string PropertyName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ErrorMessage** + +Gets the error message. + +```csharp +public string ErrorMessage { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **OptionError()** + + + +```csharp +public OptionError() +``` diff --git a/docs/api/core/proffer.configuration.provideroptions.md b/docs/api/core/proffer.configuration.provideroptions.md new file mode 100644 index 0000000..6c0a7c9 --- /dev/null +++ b/docs/api/core/proffer.configuration.provideroptions.md @@ -0,0 +1,48 @@ +# ProviderOptions + +Namespace: Proffer.Configuration + +Standard options for a provider. + +```csharp +public class ProviderOptions : IProviderOptions, INamedElementOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ProviderOptions](./proffer.configuration.provideroptions.md)
+Implements [IProviderOptions](./proffer.configuration.iprovideroptions.md), [INamedElementOptions](./proffer.configuration.inamedelementoptions.md) + +## Properties + +### **Name** + +Gets or sets the name. + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Type** + +Gets the type. + +```csharp +public string Type { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **ProviderOptions()** + + + +```csharp +public ProviderOptions() +``` diff --git a/docs/api/core/proffer.equalitycomparerbase-1.md b/docs/api/core/proffer.equalitycomparerbase-1.md new file mode 100644 index 0000000..53d3295 --- /dev/null +++ b/docs/api/core/proffer.equalitycomparerbase-1.md @@ -0,0 +1,78 @@ +# EqualityComparerBase<T> + +Namespace: Proffer + +Implements [IEqualityComparer<T>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iequalitycomparer-1) by comparing individual equality components from child class. + +```csharp +public abstract class EqualityComparerBase : , System.Collections.IEqualityComparer, +``` + +#### Type Parameters + +`T`
+The type of objects to compare. + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → EqualityComparer<T> → [EqualityComparerBase<T>](./proffer.equalitycomparerbase-1.md)
+Implements [IEqualityComparer](https://docs.microsoft.com/en-us/dotnet/api/system.collections.iequalitycomparer), IEqualityComparer<T> + +## Methods + +### **Equals(T, T)** + +When overridden in a derived class, determines whether two objects of type T are equal. + +```csharp +public bool Equals(T x, T y) +``` + +#### Parameters + +`x` T
+The first object to compare. + +`y` T
+The second object to compare. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ + true if the specified objects are equal; otherwise, false. + +### **GetHashCode(T)** + +Returns a hash code for this instance. + +```csharp +public int GetHashCode(T obj) +``` + +#### Parameters + +`obj` T
+The object. + +#### Returns + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + +### **GetEqualityComponents(T)** + +Gets the object's components that participate in equality comparisons. + +```csharp +protected abstract IEnumerable GetEqualityComponents(T obj) +``` + +#### Parameters + +`obj` T
+The object. + +#### Returns + +[IEnumerable<Object>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+An enumerable containing the properties values. diff --git a/docs/api/email/in-memory/index.md b/docs/api/email/in-memory/index.md new file mode 100644 index 0000000..45579db --- /dev/null +++ b/docs/api/email/in-memory/index.md @@ -0,0 +1,17 @@ +# Proffer.Email.InMemory + +## Proffer.Email + +[InMemoryEmailServiceCollectionExtensions](./proffer.email.inmemoryemailservicecollectionextensions.md) + +## Proffer.Email.InMemory + +[IInMemoryEmailRepository](./proffer.email.inmemory.iinmemoryemailrepository.md) + +[InMemoryEmail](./proffer.email.inmemory.inmemoryemail.md) + +[InMemoryEmailProvider](./proffer.email.inmemory.inmemoryemailprovider.md) + +[InMemoryEmailProviderType](./proffer.email.inmemory.inmemoryemailprovidertype.md) + +[InMemoryEmailRepository](./proffer.email.inmemory.inmemoryemailrepository.md) diff --git a/docs/api/email/in-memory/proffer.email.inmemory.iinmemoryemailrepository.md b/docs/api/email/in-memory/proffer.email.inmemory.iinmemoryemailrepository.md new file mode 100644 index 0000000..9a11b3b --- /dev/null +++ b/docs/api/email/in-memory/proffer.email.inmemory.iinmemoryemailrepository.md @@ -0,0 +1,38 @@ +# IInMemoryEmailRepository + +Namespace: Proffer.Email.InMemory + +A repository in memory to hold sent emails through the provider. + +```csharp +public interface IInMemoryEmailRepository +``` + +## Properties + +### **Store** + +Gets the emails store. + +```csharp +public abstract IReadOnlyCollection Store { get; } +``` + +#### Property Value + +[IReadOnlyCollection<InMemoryEmail>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1)
+ +## Methods + +### **Save(InMemoryEmail)** + +Saves the specified email in the store. + +```csharp +void Save(InMemoryEmail email) +``` + +#### Parameters + +`email` [InMemoryEmail](./proffer.email.inmemory.inmemoryemail.md)
+The email. diff --git a/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemail.md b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemail.md new file mode 100644 index 0000000..82c56bf --- /dev/null +++ b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemail.md @@ -0,0 +1,131 @@ +# InMemoryEmail + +Namespace: Proffer.Email.InMemory + +An object to retain the values of the email that would have been sent. + +```csharp +public class InMemoryEmail +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [InMemoryEmail](./proffer.email.inmemory.inmemoryemail.md) + +## Properties + +### **Subject** + +Gets or sets the subject. + +```csharp +public string Subject { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **MessageText** + +Gets or sets the message as plain-text. + +```csharp +public string MessageText { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **MessageHtml** + +Gets or sets the message as HTML. + +```csharp +public string MessageHtml { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **To** + +Gets or sets the email recipients. + +```csharp +public IEmailAddress[] To { get; set; } +``` + +#### Property Value + +IEmailAddress[]
+ +### **Cc** + +Gets or sets the email recipients. + +```csharp +public IEmailAddress[] Cc { get; set; } +``` + +#### Property Value + +IEmailAddress[]
+ +### **Bcc** + +Gets or sets the BCC email recipients. + +```csharp +public IEmailAddress[] Bcc { get; set; } +``` + +#### Property Value + +IEmailAddress[]
+ +### **From** + +Gets or sets the sender email address. + +```csharp +public IEmailAddress From { get; set; } +``` + +#### Property Value + +IEmailAddress
+ +### **ReplyTo** + +Gets or sets the reply-to email address. + +```csharp +public IEmailAddress ReplyTo { get; set; } +``` + +#### Property Value + +IEmailAddress
+ +### **Attachments** + +Gets or sets the attachments files. + +```csharp +public IEnumerable Attachments { get; set; } +``` + +#### Property Value + +[IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ +## Constructors + +### **InMemoryEmail()** + + + +```csharp +public InMemoryEmail() +``` diff --git a/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailprovider.md b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailprovider.md new file mode 100644 index 0000000..c7f1a8f --- /dev/null +++ b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailprovider.md @@ -0,0 +1,137 @@ +# InMemoryEmailProvider + +Namespace: Proffer.Email.InMemory + +A provider which does not send any email but holds it in a collection in memory. + +```csharp +public class InMemoryEmailProvider : Proffer.Email.IEmailProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [InMemoryEmailProvider](./proffer.email.inmemory.inmemoryemailprovider.md)
+Implements IEmailProvider + +## Constructors + +### **InMemoryEmailProvider(IInMemoryEmailRepository)** + +Initializes a new instance of the [InMemoryEmailProvider](./proffer.email.inmemory.inmemoryemailprovider.md) class. + +```csharp +public InMemoryEmailProvider(IInMemoryEmailRepository inMemoryEmailRepository) +``` + +#### Parameters + +`inMemoryEmailRepository` [IInMemoryEmailRepository](./proffer.email.inmemory.iinmemoryemailrepository.md)
+The in-memory email repository. + +## Methods + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>, IEmailAddress)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, IEnumerable ccRecipients, IEnumerable bccRecipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments, IEmailAddress replyTo) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`ccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The CC email recipients. + +`bccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The BCC email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`replyTo` IEmailAddress
+The reply-to email address. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. diff --git a/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailprovidertype.md b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailprovidertype.md new file mode 100644 index 0000000..73ed52e --- /dev/null +++ b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailprovidertype.md @@ -0,0 +1,62 @@ +# InMemoryEmailProviderType + +Namespace: Proffer.Email.InMemory + +Builds [InMemoryEmailProvider](./proffer.email.inmemory.inmemoryemailprovider.md). + +```csharp +public class InMemoryEmailProviderType : Proffer.Email.IEmailProviderType +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [InMemoryEmailProviderType](./proffer.email.inmemory.inmemoryemailprovidertype.md)
+Implements IEmailProviderType + +## Properties + +### **Name** + +Gets the name. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **InMemoryEmailProviderType(IInMemoryEmailRepository)** + +Initializes a new instance of the [InMemoryEmailProviderType](./proffer.email.inmemory.inmemoryemailprovidertype.md) class. + +```csharp +public InMemoryEmailProviderType(IInMemoryEmailRepository inMemoryEmailRepository) +``` + +#### Parameters + +`inMemoryEmailRepository` [IInMemoryEmailRepository](./proffer.email.inmemory.iinmemoryemailrepository.md)
+The in-memory email repository. + +## Methods + +### **BuildProvider(IEmailProviderOptions)** + +Builds the provider. + +```csharp +public IEmailProvider BuildProvider(IEmailProviderOptions providerOptions) +``` + +#### Parameters + +`providerOptions` IEmailProviderOptions
+The provider options. + +#### Returns + +IEmailProvider
+ + A new . diff --git a/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailrepository.md b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailrepository.md new file mode 100644 index 0000000..b987344 --- /dev/null +++ b/docs/api/email/in-memory/proffer.email.inmemory.inmemoryemailrepository.md @@ -0,0 +1,51 @@ +# InMemoryEmailRepository + +Namespace: Proffer.Email.InMemory + +A repository in memory to hold sent emails through the provider. + +```csharp +public class InMemoryEmailRepository : IInMemoryEmailRepository +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [InMemoryEmailRepository](./proffer.email.inmemory.inmemoryemailrepository.md)
+Implements [IInMemoryEmailRepository](./proffer.email.inmemory.iinmemoryemailrepository.md) + +## Properties + +### **Store** + +Gets the emails store. + +```csharp +public IReadOnlyCollection Store { get; } +``` + +#### Property Value + +[IReadOnlyCollection<InMemoryEmail>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1)
+ +## Constructors + +### **InMemoryEmailRepository()** + + + +```csharp +public InMemoryEmailRepository() +``` + +## Methods + +### **Save(InMemoryEmail)** + +Saves the specified email in the store. + +```csharp +public void Save(InMemoryEmail email) +``` + +#### Parameters + +`email` [InMemoryEmail](./proffer.email.inmemory.inmemoryemail.md)
+The email. diff --git a/docs/api/email/in-memory/proffer.email.inmemoryemailservicecollectionextensions.md b/docs/api/email/in-memory/proffer.email.inmemoryemailservicecollectionextensions.md new file mode 100644 index 0000000..2d8a6ab --- /dev/null +++ b/docs/api/email/in-memory/proffer.email.inmemoryemailservicecollectionextensions.md @@ -0,0 +1,31 @@ +# InMemoryEmailServiceCollectionExtensions + +Namespace: Proffer.Email + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class InMemoryEmailServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [InMemoryEmailServiceCollectionExtensions](./proffer.email.inmemoryemailservicecollectionextensions.md) + +## Methods + +### **AddInMemoryEmail(IServiceCollection)** + +Registers the Proffer.Email services to an in-memory collection. + +```csharp +public static IServiceCollection AddInMemoryEmail(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/email/index.md b/docs/api/email/index.md new file mode 100644 index 0000000..b78131e --- /dev/null +++ b/docs/api/email/index.md @@ -0,0 +1,41 @@ +# Proffer.Email + +## Proffer.Email + +[EmailOptions](./proffer.email.emailoptions.md) + +[EmailProviderOptions](./proffer.email.emailprovideroptions.md) + +[EmailServiceCollectionExtensions](./proffer.email.emailservicecollectionextensions.md) + +[EmailTemplateType](./proffer.email.emailtemplatetype.md) + +[IEmailAddress](./proffer.email.iemailaddress.md) + +[IEmailAttachment](./proffer.email.iemailattachment.md) + +[IEmailProvider](./proffer.email.iemailprovider.md) + +[IEmailProviderOptions](./proffer.email.iemailprovideroptions.md) + +[IEmailProviderType](./proffer.email.iemailprovidertype.md) + +[IEmailSender](./proffer.email.iemailsender.md) + +[MockupExceptionsOptions](./proffer.email.mockupexceptionsoptions.md) + +[MockupOptions](./proffer.email.mockupoptions.md) + +## Proffer.Email.Internal + +[EmailAddress](./proffer.email.internal.emailaddress.md) + +[EmailAddressEqualityComparer](./proffer.email.internal.emailaddressequalitycomparer.md) + +[EmailAddressStrictEqualityComparer](./proffer.email.internal.emailaddressstrictequalitycomparer.md) + +[EmailAttachment](./proffer.email.internal.emailattachment.md) + +[EmailAttachmentEqualityComparer](./proffer.email.internal.emailattachmentequalitycomparer.md) + +[EmailSender](./proffer.email.internal.emailsender.md) diff --git a/docs/api/email/proffer.email.emailoptions.md b/docs/api/email/proffer.email.emailoptions.md new file mode 100644 index 0000000..7e84ff1 --- /dev/null +++ b/docs/api/email/proffer.email.emailoptions.md @@ -0,0 +1,81 @@ +# EmailOptions + +Namespace: Proffer.Email + +The Proffer.Email options with providers. + +```csharp +public class EmailOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EmailOptions](./proffer.email.emailoptions.md) + +## Fields + +### **DefaultConfigurationSectionName** + +The default configuration section name. + +```csharp +public static string DefaultConfigurationSectionName; +``` + +## Properties + +### **Provider** + +Gets or sets the provider options. + +```csharp +public EmailProviderOptions Provider { get; set; } +``` + +#### Property Value + +[EmailProviderOptions](./proffer.email.emailprovideroptions.md)
+ +### **DefaultSender** + +Gets or sets the default sender email address. + +```csharp +public EmailAddress DefaultSender { get; set; } +``` + +#### Property Value + +[EmailAddress](./proffer.email.internal.emailaddress.md)
+ +### **TemplateStorage** + +Gets or sets the template storage key to load templates from. + +```csharp +public string TemplateStorage { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Mockup** + +Gets or sets the mockup options. + +```csharp +public MockupOptions Mockup { get; set; } +``` + +#### Property Value + +[MockupOptions](./proffer.email.mockupoptions.md)
+ +## Constructors + +### **EmailOptions()** + + + +```csharp +public EmailOptions() +``` diff --git a/docs/api/email/proffer.email.emailprovideroptions.md b/docs/api/email/proffer.email.emailprovideroptions.md new file mode 100644 index 0000000..53dba5c --- /dev/null +++ b/docs/api/email/proffer.email.emailprovideroptions.md @@ -0,0 +1,48 @@ +# EmailProviderOptions + +Namespace: Proffer.Email + +Generic options for a [IEmailProvider](./proffer.email.iemailprovider.md). + +```csharp +public class EmailProviderOptions : IEmailProviderOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EmailProviderOptions](./proffer.email.emailprovideroptions.md)
+Implements [IEmailProviderOptions](./proffer.email.iemailprovideroptions.md) + +## Properties + +### **Type** + +Gets or sets the type of the provider. + +```csharp +public string Type { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Parameters** + +Gets or sets the provider parameters. + +```csharp +public Dictionary Parameters { get; set; } +``` + +#### Property Value + +[Dictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2)
+ +## Constructors + +### **EmailProviderOptions()** + + + +```csharp +public EmailProviderOptions() +``` diff --git a/docs/api/email/proffer.email.emailservicecollectionextensions.md b/docs/api/email/proffer.email.emailservicecollectionextensions.md new file mode 100644 index 0000000..019c7bf --- /dev/null +++ b/docs/api/email/proffer.email.emailservicecollectionextensions.md @@ -0,0 +1,59 @@ +# EmailServiceCollectionExtensions + +Namespace: Proffer.Email + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class EmailServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EmailServiceCollectionExtensions](./proffer.email.emailservicecollectionextensions.md) + +## Methods + +### **AddEmail(IServiceCollection, IConfigurationRoot, String)** + +Registers Proffer.Email services and configures it from the given at section . + +```csharp +public static IServiceCollection AddEmail(IServiceCollection services, IConfigurationRoot configurationRoot, string sectionName) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +`configurationRoot` IConfigurationRoot
+The configuration root. + +`sectionName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the section. + +#### Returns + +IServiceCollection
+ + The service collection. + +### **AddEmail(IServiceCollection, IConfigurationSection)** + +Registers Proffer.Email services and configures it with the given section. + +```csharp +public static IServiceCollection AddEmail(IServiceCollection services, IConfigurationSection configurationSection) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +`configurationSection` IConfigurationSection
+The configuration section. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/email/proffer.email.emailtemplatetype.md b/docs/api/email/proffer.email.emailtemplatetype.md new file mode 100644 index 0000000..9956405 --- /dev/null +++ b/docs/api/email/proffer.email.emailtemplatetype.md @@ -0,0 +1,20 @@ +# EmailTemplateType + +Namespace: Proffer.Email + +Type of template for a templated email. + +```csharp +public enum EmailTemplateType +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Enum](https://docs.microsoft.com/en-us/dotnet/api/system.enum) → [EmailTemplateType](./proffer.email.emailtemplatetype.md)
+Implements [IComparable](https://docs.microsoft.com/en-us/dotnet/api/system.icomparable), [IFormattable](https://docs.microsoft.com/en-us/dotnet/api/system.iformattable), [IConvertible](https://docs.microsoft.com/en-us/dotnet/api/system.iconvertible) + +## Fields + +| Name | Value | Description | +| --- | --: | --- | +| Subject | 0 | The templated subject. | +| BodyHtml | 1 | The templated body as HTML. | +| BodyText | 2 | The templated body as plain-text. | diff --git a/docs/api/email/proffer.email.iemailaddress.md b/docs/api/email/proffer.email.iemailaddress.md new file mode 100644 index 0000000..8f50d89 --- /dev/null +++ b/docs/api/email/proffer.email.iemailaddress.md @@ -0,0 +1,35 @@ +# IEmailAddress + +Namespace: Proffer.Email + +An email address with its optional display name. + +```csharp +public interface IEmailAddress +``` + +## Properties + +### **Email** + +Gets the email. + +```csharp +public abstract string Email { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **DisplayName** + +Gets the display name. + +```csharp +public abstract string DisplayName { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/email/proffer.email.iemailattachment.md b/docs/api/email/proffer.email.iemailattachment.md new file mode 100644 index 0000000..20dab08 --- /dev/null +++ b/docs/api/email/proffer.email.iemailattachment.md @@ -0,0 +1,71 @@ +# IEmailAttachment + +Namespace: Proffer.Email + +An email attachment file. + +```csharp +public interface IEmailAttachment +``` + +## Properties + +### **FileName** + +Gets or sets the file name. + +```csharp +public abstract string FileName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + +Gets or sets the file content. + +```csharp +public abstract Byte[] Data { get; set; } +``` + +#### Property Value + +[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+ +### **MediaType** + +Gets or sets the media type. + +```csharp +public abstract string MediaType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **MediaSubtype** + +Gets or sets the media subtype. + +```csharp +public abstract string MediaSubtype { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ContentType** + +Gets the content-type. + +```csharp +public abstract string ContentType { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/email/proffer.email.iemailprovider.md b/docs/api/email/proffer.email.iemailprovider.md new file mode 100644 index 0000000..5d618a2 --- /dev/null +++ b/docs/api/email/proffer.email.iemailprovider.md @@ -0,0 +1,119 @@ +# IEmailProvider + +Namespace: Proffer.Email + +A provider sends email using a particular messaging protocol or API. + +```csharp +public interface IEmailProvider +``` + +## Methods + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String)** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>)** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>, IEmailAddress)** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, IEnumerable ccRecipients, IEnumerable bccRecipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments, IEmailAddress replyTo) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`ccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The CC email recipients. + +`bccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The BCC email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. diff --git a/docs/api/email/proffer.email.iemailprovideroptions.md b/docs/api/email/proffer.email.iemailprovideroptions.md new file mode 100644 index 0000000..d0908e4 --- /dev/null +++ b/docs/api/email/proffer.email.iemailprovideroptions.md @@ -0,0 +1,35 @@ +# IEmailProviderOptions + +Namespace: Proffer.Email + +Options for a [IEmailProvider](./proffer.email.iemailprovider.md). + +```csharp +public interface IEmailProviderOptions +``` + +## Properties + +### **Type** + +Gets or sets the type of the provider. + +```csharp +public abstract string Type { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Parameters** + +Gets or sets the provider parameters. + +```csharp +public abstract Dictionary Parameters { get; set; } +``` + +#### Property Value + +[Dictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2)
diff --git a/docs/api/email/proffer.email.iemailprovidertype.md b/docs/api/email/proffer.email.iemailprovidertype.md new file mode 100644 index 0000000..c7adcf5 --- /dev/null +++ b/docs/api/email/proffer.email.iemailprovidertype.md @@ -0,0 +1,43 @@ +# IEmailProviderType + +Namespace: Proffer.Email + +Builds providers using a particular messaging protocol or API. + +```csharp +public interface IEmailProviderType +``` + +## Properties + +### **Name** + +Gets the name. + +```csharp +public abstract string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Methods + +### **BuildProvider(IEmailProviderOptions)** + +Builds the provider. + +```csharp +IEmailProvider BuildProvider(IEmailProviderOptions providerOptions) +``` + +#### Parameters + +`providerOptions` [IEmailProviderOptions](./proffer.email.iemailprovideroptions.md)
+The provider options. + +#### Returns + +[IEmailProvider](./proffer.email.iemailprovider.md)
+A new . diff --git a/docs/api/email/proffer.email.iemailsender.md b/docs/api/email/proffer.email.iemailsender.md new file mode 100644 index 0000000..be861b5 --- /dev/null +++ b/docs/api/email/proffer.email.iemailsender.md @@ -0,0 +1,428 @@ +# IEmailSender + +Namespace: Proffer.Email + +Sends templated or raw emails using configured providers. + +```csharp +public interface IEmailSender +``` + +## Methods + +### **SendEmailAsync(String, String, IEmailAddress[])** + +Sends an email. + +```csharp +Task SendEmailAsync(string subject, string message, IEmailAddress[] to) +``` + +#### Parameters + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, String, String, IEmailAddress[])** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, string subject, string message, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEmailAddress, String, String, Boolean, IEmailAddress[])** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, IEmailAddress replyTo, string subject, string message, bool plainTextOnly, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`plainTextOnly` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true the body shoud be sent as plain text only. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, String, String, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, string subject, string message, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEmailAddress, String, String, Boolean, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, IEmailAddress replyTo, string subject, string message, bool plainTextOnly, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`plainTextOnly` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true the body shoud be sent as plain text only. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, String, String, IEnumerable<IEmailAttachment>, IEmailAddress[], IEmailAddress[], IEmailAddress[], IEmailAddress, Boolean)** + +Sends an email. + +```csharp +Task SendEmailAsync(IEmailAddress from, string subject, string message, IEnumerable attachments, IEmailAddress[] to, IEmailAddress[] cc, IEmailAddress[] bcc, IEmailAddress replyTo, bool plainTextOnly) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +`cc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The CC email recipients. + +`bcc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The BCC email recipients. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`plainTextOnly` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true the body shoud be sent as plain text only. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(String, T, IEmailAddress[])** + +Sends a templated email from the configured default sender email address. + +```csharp +Task SendTemplatedEmailAsync(string templateKey, T context, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEmailAddress[])** + +Sends a templated email. + +```csharp +Task SendTemplatedEmailAsync(IEmailAddress from, string templateKey, T context, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, IEmailAddress, String, T, IEmailAddress[])** + +Sends a templated email. + +```csharp +Task SendTemplatedEmailAsync(IEmailAddress from, IEmailAddress replyTo, string templateKey, T context, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends a templated email. + +```csharp +Task SendTemplatedEmailAsync(IEmailAddress from, string templateKey, T context, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends a templated email. + +```csharp +Task SendTemplatedEmailAsync(IEmailAddress from, IEmailAddress replyTo, string templateKey, T context, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[], IEmailAddress[], IEmailAddress[], IEmailAddress)** + +Sends a templated email. + +```csharp +Task SendTemplatedEmailAsync(IEmailAddress from, string templateKey, T context, IEnumerable attachments, IEmailAddress[] to, IEmailAddress[] cc, IEmailAddress[] bcc, IEmailAddress replyTo) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +`cc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The CC email recipients. + +`bcc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The BCC email recipients. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. diff --git a/docs/api/email/proffer.email.internal.emailaddress.md b/docs/api/email/proffer.email.internal.emailaddress.md new file mode 100644 index 0000000..bce0a26 --- /dev/null +++ b/docs/api/email/proffer.email.internal.emailaddress.md @@ -0,0 +1,64 @@ +# EmailAddress + +Namespace: Proffer.Email.Internal + +A simple email address with its optional display name. + +```csharp +public class EmailAddress : Proffer.Email.IEmailAddress +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EmailAddress](./proffer.email.internal.emailaddress.md)
+Implements [IEmailAddress](./proffer.email.iemailaddress.md) + +## Properties + +### **Email** + +Gets or sets the email. + +```csharp +public string Email { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **DisplayName** + +Gets or sets the display name. + +```csharp +public string DisplayName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **EmailAddress()** + +Initializes a new instance of the [EmailAddress](./proffer.email.internal.emailaddress.md) class. + +```csharp +public EmailAddress() +``` + +### **EmailAddress(String, String)** + +Initializes a new instance of the [EmailAddress](./proffer.email.internal.emailaddress.md) class. + +```csharp +public EmailAddress(string email, string displayName) +``` + +#### Parameters + +`email` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The email. + +`displayName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The display name. diff --git a/docs/api/email/proffer.email.internal.emailaddressequalitycomparer.md b/docs/api/email/proffer.email.internal.emailaddressequalitycomparer.md new file mode 100644 index 0000000..614a230 --- /dev/null +++ b/docs/api/email/proffer.email.internal.emailaddressequalitycomparer.md @@ -0,0 +1,43 @@ +# EmailAddressEqualityComparer + +Namespace: Proffer.Email.Internal + +Supports the comparison of [IEmailAddress](./proffer.email.iemailaddress.md) for equality when the email address only should match. + +```csharp +public class EmailAddressEqualityComparer : Proffer.EqualityComparerBase`1[[Proffer.Email.IEmailAddress, Proffer.Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer`1[[Proffer.Email.IEmailAddress, Proffer.Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EqualityComparer<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.equalitycomparer-1) → EqualityComparerBase<IEmailAddress> → [EmailAddressEqualityComparer](./proffer.email.internal.emailaddressequalitycomparer.md)
+Implements [IEqualityComparer](https://docs.microsoft.com/en-us/dotnet/api/system.collections.iequalitycomparer), [IEqualityComparer<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iequalitycomparer-1) + +## Constructors + +### **EmailAddressEqualityComparer()** + + + +```csharp +public EmailAddressEqualityComparer() +``` + +## Methods + +### **GetEqualityComponents(IEmailAddress)** + +Gets the object's components that participate in equality comparisons. + +```csharp +protected IEnumerable GetEqualityComponents(IEmailAddress obj) +``` + +#### Parameters + +`obj` [IEmailAddress](./proffer.email.iemailaddress.md)
+The object. + +#### Returns + +[IEnumerable<Object>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ + An enumerable containing the properties values. diff --git a/docs/api/email/proffer.email.internal.emailaddressstrictequalitycomparer.md b/docs/api/email/proffer.email.internal.emailaddressstrictequalitycomparer.md new file mode 100644 index 0000000..d6189a5 --- /dev/null +++ b/docs/api/email/proffer.email.internal.emailaddressstrictequalitycomparer.md @@ -0,0 +1,43 @@ +# EmailAddressStrictEqualityComparer + +Namespace: Proffer.Email.Internal + +Supports the comparison of [IEmailAddress](./proffer.email.iemailaddress.md) for equality when both the email address and the display name should match. + +```csharp +public class EmailAddressStrictEqualityComparer : Proffer.EqualityComparerBase`1[[Proffer.Email.IEmailAddress, Proffer.Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer`1[[Proffer.Email.IEmailAddress, Proffer.Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EqualityComparer<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.equalitycomparer-1) → EqualityComparerBase<IEmailAddress> → [EmailAddressStrictEqualityComparer](./proffer.email.internal.emailaddressstrictequalitycomparer.md)
+Implements [IEqualityComparer](https://docs.microsoft.com/en-us/dotnet/api/system.collections.iequalitycomparer), [IEqualityComparer<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iequalitycomparer-1) + +## Constructors + +### **EmailAddressStrictEqualityComparer()** + + + +```csharp +public EmailAddressStrictEqualityComparer() +``` + +## Methods + +### **GetEqualityComponents(IEmailAddress)** + +Gets the object's components that participate in equality comparisons. + +```csharp +protected IEnumerable GetEqualityComponents(IEmailAddress obj) +``` + +#### Parameters + +`obj` [IEmailAddress](./proffer.email.iemailaddress.md)
+The object. + +#### Returns + +[IEnumerable<Object>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ + An enumerable containing the properties values. diff --git a/docs/api/email/proffer.email.internal.emailattachment.md b/docs/api/email/proffer.email.internal.emailattachment.md new file mode 100644 index 0000000..b0c14c6 --- /dev/null +++ b/docs/api/email/proffer.email.internal.emailattachment.md @@ -0,0 +1,125 @@ +# EmailAttachment + +Namespace: Proffer.Email.Internal + +A simpl email attachment file. + +```csharp +public class EmailAttachment : Proffer.Email.IEmailAttachment +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EmailAttachment](./proffer.email.internal.emailattachment.md)
+Implements [IEmailAttachment](./proffer.email.iemailattachment.md) + +## Properties + +### **FileName** + +Gets or sets the file name. + +```csharp +public string FileName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + +Gets or sets the file content. + +```csharp +public Byte[] Data { get; set; } +``` + +#### Property Value + +[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+ +### **MediaType** + +Gets or sets the media type. + +```csharp +public string MediaType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **MediaSubtype** + +Gets or sets the media subtype. + +```csharp +public string MediaSubtype { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ContentType** + +Gets the content-type. + +```csharp +public string ContentType { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **EmailAttachment()** + +Initializes a new instance of the [EmailAttachment](./proffer.email.internal.emailattachment.md) class. + +```csharp +public EmailAttachment() +``` + +### **EmailAttachment(String, Byte[], String)** + +Initializes a new instance of the [EmailAttachment](./proffer.email.internal.emailattachment.md) class. + +```csharp +public EmailAttachment(string fileName, Byte[] data, string contentType) +``` + +#### Parameters + +`fileName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file name. + +`data` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The file content. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type. + +### **EmailAttachment(String, Byte[], String, String)** + +Initializes a new instance of the [EmailAttachment](./proffer.email.internal.emailattachment.md) class. + +```csharp +public EmailAttachment(string fileName, Byte[] data, string mediaType, string mediaSubtype) +``` + +#### Parameters + +`fileName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file name. + +`data` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The file content. + +`mediaType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The media type. + +`mediaSubtype` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The media subtype. diff --git a/docs/api/email/proffer.email.internal.emailattachmentequalitycomparer.md b/docs/api/email/proffer.email.internal.emailattachmentequalitycomparer.md new file mode 100644 index 0000000..637f4fd --- /dev/null +++ b/docs/api/email/proffer.email.internal.emailattachmentequalitycomparer.md @@ -0,0 +1,43 @@ +# EmailAttachmentEqualityComparer + +Namespace: Proffer.Email.Internal + +Supports the comparison of [IEmailAttachment](./proffer.email.iemailattachment.md) for equality. + +```csharp +public class EmailAttachmentEqualityComparer : Proffer.EqualityComparerBase`1[[Proffer.Email.IEmailAttachment, Proffer.Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer`1[[Proffer.Email.IEmailAttachment, Proffer.Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EqualityComparer<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.equalitycomparer-1) → EqualityComparerBase<IEmailAttachment> → [EmailAttachmentEqualityComparer](./proffer.email.internal.emailattachmentequalitycomparer.md)
+Implements [IEqualityComparer](https://docs.microsoft.com/en-us/dotnet/api/system.collections.iequalitycomparer), [IEqualityComparer<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iequalitycomparer-1) + +## Constructors + +### **EmailAttachmentEqualityComparer()** + + + +```csharp +public EmailAttachmentEqualityComparer() +``` + +## Methods + +### **GetEqualityComponents(IEmailAttachment)** + +Gets the object's components that participate in equality comparisons. + +```csharp +protected IEnumerable GetEqualityComponents(IEmailAttachment obj) +``` + +#### Parameters + +`obj` [IEmailAttachment](./proffer.email.iemailattachment.md)
+The object. + +#### Returns + +[IEnumerable<Object>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ + An enumerable containing the properties values. diff --git a/docs/api/email/proffer.email.internal.emailsender.md b/docs/api/email/proffer.email.internal.emailsender.md new file mode 100644 index 0000000..9b5dc3e --- /dev/null +++ b/docs/api/email/proffer.email.internal.emailsender.md @@ -0,0 +1,477 @@ +# EmailSender + +Namespace: Proffer.Email.Internal + +Sends templated or raw emails using configured providers. + +```csharp +public class EmailSender : Proffer.Email.IEmailSender +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EmailSender](./proffer.email.internal.emailsender.md)
+Implements [IEmailSender](./proffer.email.iemailsender.md) + +## Constructors + +### **EmailSender(IEnumerable<IEmailProviderType>, IOptions<EmailOptions>, IStorageFactory, ITemplateLoaderFactory)** + +Initializes a new instance of the [EmailSender](./proffer.email.internal.emailsender.md) class. + +```csharp +public EmailSender(IEnumerable emailProviderTypes, IOptions options, IStorageFactory storageFactory, ITemplateLoaderFactory templateLoaderFactory) +``` + +#### Parameters + +`emailProviderTypes` [IEnumerable<IEmailProviderType>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email provider types. + +`options` IOptions<EmailOptions>
+The Proffer.Email options. + +`storageFactory` IStorageFactory
+The storage factory. + +`templateLoaderFactory` ITemplateLoaderFactory
+The template loader factory. + +#### Exceptions + +[ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception)
+ +## Methods + +### **SendEmailAsync(String, String, IEmailAddress[])** + +Sends an email. + +```csharp +public Task SendEmailAsync(string subject, string message, IEmailAddress[] to) +``` + +#### Parameters + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, String, String, IEmailAddress[])** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, string subject, string message, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEmailAddress, String, String, Boolean, IEmailAddress[])** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEmailAddress replyTo, string subject, string message, bool plainTextOnly, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`plainTextOnly` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true the body shoud be sent as plain text only. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, String, String, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, string subject, string message, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEmailAddress, String, String, Boolean, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEmailAddress replyTo, string subject, string message, bool plainTextOnly, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`plainTextOnly` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true the body shoud be sent as plain text only. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, String, String, IEnumerable<IEmailAttachment>, IEmailAddress[], IEmailAddress[], IEmailAddress[], IEmailAddress, Boolean)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, string subject, string message, IEnumerable attachments, IEmailAddress[] to, IEmailAddress[] cc, IEmailAddress[] bcc, IEmailAddress replyTo, bool plainTextOnly) +``` + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`message` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +`cc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The CC email recipients. + +`bcc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The BCC email recipients. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`plainTextOnly` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true the body shoud be sent as plain text only. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(String, T, IEmailAddress[])** + +Sends a templated email from the configured default sender email address. + +```csharp +public Task SendTemplatedEmailAsync(string templateKey, T context, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEmailAddress[])** + +Sends a templated email. + +```csharp +public Task SendTemplatedEmailAsync(IEmailAddress from, string templateKey, T context, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, IEmailAddress, String, T, IEmailAddress[])** + +Sends a templated email. + +```csharp +public Task SendTemplatedEmailAsync(IEmailAddress from, IEmailAddress replyTo, string templateKey, T context, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends a templated email. + +```csharp +public Task SendTemplatedEmailAsync(IEmailAddress from, string templateKey, T context, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[])** + +Sends a templated email. + +```csharp +public Task SendTemplatedEmailAsync(IEmailAddress from, IEmailAddress replyTo, string templateKey, T context, IEnumerable attachments, IEmailAddress[] to) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[], IEmailAddress[], IEmailAddress[], IEmailAddress)** + +Sends a templated email. + +```csharp +public Task SendTemplatedEmailAsync(IEmailAddress from, string templateKey, T context, IEnumerable attachments, IEmailAddress[] to, IEmailAddress[] cc, IEmailAddress[] bcc, IEmailAddress replyTo) +``` + +#### Type Parameters + +`T`
+The type of context to apply on the template. + +#### Parameters + +`from` [IEmailAddress](./proffer.email.iemailaddress.md)
+The sender email address. + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`context` T
+The context to apply on the template. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`to` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The email recipients. + +`cc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The CC email recipients. + +`bcc` [IEmailAddress[]](./proffer.email.iemailaddress.md)
+The BCC email recipients. + +`replyTo` [IEmailAddress](./proffer.email.iemailaddress.md)
+The reply-to email address. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ +### **GetTemplateAsync(String, EmailTemplateType)** + +Gets the template asynchronous. + +```csharp +protected Task GetTemplateAsync(string templateKey, EmailTemplateType templateType) +``` + +#### Parameters + +`templateKey` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template key. + +`templateType` [EmailTemplateType](./proffer.email.emailtemplatetype.md)
+Type of the template. + +#### Returns + +[Task<ITemplate>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1)
diff --git a/docs/api/email/proffer.email.mockupexceptionsoptions.md b/docs/api/email/proffer.email.mockupexceptionsoptions.md new file mode 100644 index 0000000..5ec2387 --- /dev/null +++ b/docs/api/email/proffer.email.mockupexceptionsoptions.md @@ -0,0 +1,47 @@ +# MockupExceptionsOptions + +Namespace: Proffer.Email + +Options to exclude some emails or domains from a mockup configuration. + +```csharp +public class MockupExceptionsOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [MockupExceptionsOptions](./proffer.email.mockupexceptionsoptions.md) + +## Properties + +### **Emails** + +Gets or sets the emails exclusions. + +```csharp +public List Emails { get; set; } +``` + +#### Property Value + +[List<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1)
+ +### **Domains** + +Gets or sets the domains exclusions. + +```csharp +public List Domains { get; set; } +``` + +#### Property Value + +[List<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1)
+ +## Constructors + +### **MockupExceptionsOptions()** + + + +```csharp +public MockupExceptionsOptions() +``` diff --git a/docs/api/email/proffer.email.mockupoptions.md b/docs/api/email/proffer.email.mockupoptions.md new file mode 100644 index 0000000..d7ee011 --- /dev/null +++ b/docs/api/email/proffer.email.mockupoptions.md @@ -0,0 +1,59 @@ +# MockupOptions + +Namespace: Proffer.Email + +Options to mockup the email sender (all recipients would be redirect to the mockup recipients). + +```csharp +public class MockupOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [MockupOptions](./proffer.email.mockupoptions.md) + +## Properties + +### **Recipients** + +Gets or sets the mockup recipients. + +```csharp +public List Recipients { get; set; } +``` + +#### Property Value + +[List<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1)
+ +### **Exceptions** + +Gets or sets the exceptions options. + +```csharp +public MockupExceptionsOptions Exceptions { get; set; } +``` + +#### Property Value + +[MockupExceptionsOptions](./proffer.email.mockupexceptionsoptions.md)
+ +### **Disclaimer** + +Gets or sets the disclaimer to add at the end of a mocked up email. + +```csharp +public string Disclaimer { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **MockupOptions()** + + + +```csharp +public MockupOptions() +``` diff --git a/docs/api/email/sendgrid/index.md b/docs/api/email/sendgrid/index.md new file mode 100644 index 0000000..678c299 --- /dev/null +++ b/docs/api/email/sendgrid/index.md @@ -0,0 +1,11 @@ +# Proffer.Email.SendGrid + +## Proffer.Email + +[ServiceCollectionExtensions](./proffer.email.servicecollectionextensions.md) + +## Proffer.Email.SendGrid + +[SendGridEmailProvider](./proffer.email.sendgrid.sendgridemailprovider.md) + +[SendGridEmailProviderType](./proffer.email.sendgrid.sendgridemailprovidertype.md) diff --git a/docs/api/email/sendgrid/proffer.email.sendgrid.sendgridemailprovider.md b/docs/api/email/sendgrid/proffer.email.sendgrid.sendgridemailprovider.md new file mode 100644 index 0000000..22f98f8 --- /dev/null +++ b/docs/api/email/sendgrid/proffer.email.sendgrid.sendgridemailprovider.md @@ -0,0 +1,148 @@ +# SendGridEmailProvider + +Namespace: Proffer.Email.SendGrid + +A provider that sends email using N:SendGrid API. + +```csharp +public class SendGridEmailProvider : Proffer.Email.IEmailProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [SendGridEmailProvider](./proffer.email.sendgrid.sendgridemailprovider.md)
+Implements IEmailProvider + +## Constructors + +### **SendGridEmailProvider(IEmailProviderOptions)** + +Initializes a new instance of the [SendGridEmailProvider](./proffer.email.sendgrid.sendgridemailprovider.md) class. + +```csharp +public SendGridEmailProvider(IEmailProviderOptions options) +``` + +#### Parameters + +`options` IEmailProviderOptions
+The options. + +#### Exceptions + +[ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception)
+apiKey + +## Methods + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>, IEmailAddress)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, IEnumerable ccRecipients, IEnumerable bccRecipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments, IEmailAddress replyTo) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`ccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The CC email recipients. + +`bccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The BCC email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`replyTo` IEmailAddress
+The reply-to email address. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ +#### Exceptions + +[ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception)
+Each email address should be unique between to, cc, and bcc recipients. We found duplicates. + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+Cannot Send Email: {response.StatusCode} diff --git a/docs/api/email/sendgrid/proffer.email.sendgrid.sendgridemailprovidertype.md b/docs/api/email/sendgrid/proffer.email.sendgrid.sendgridemailprovidertype.md new file mode 100644 index 0000000..ea92792 --- /dev/null +++ b/docs/api/email/sendgrid/proffer.email.sendgrid.sendgridemailprovidertype.md @@ -0,0 +1,57 @@ +# SendGridEmailProviderType + +Namespace: Proffer.Email.SendGrid + +Builds [SendGridEmailProvider](./proffer.email.sendgrid.sendgridemailprovider.md). + +```csharp +public class SendGridEmailProviderType : Proffer.Email.IEmailProviderType +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [SendGridEmailProviderType](./proffer.email.sendgrid.sendgridemailprovidertype.md)
+Implements IEmailProviderType + +## Properties + +### **Name** + +Gets the name. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **SendGridEmailProviderType()** + + + +```csharp +public SendGridEmailProviderType() +``` + +## Methods + +### **BuildProvider(IEmailProviderOptions)** + +Builds the provider. + +```csharp +public IEmailProvider BuildProvider(IEmailProviderOptions providerOptions) +``` + +#### Parameters + +`providerOptions` IEmailProviderOptions
+The provider options. + +#### Returns + +IEmailProvider
+ + A new . diff --git a/docs/api/email/sendgrid/proffer.email.servicecollectionextensions.md b/docs/api/email/sendgrid/proffer.email.servicecollectionextensions.md new file mode 100644 index 0000000..a71fd64 --- /dev/null +++ b/docs/api/email/sendgrid/proffer.email.servicecollectionextensions.md @@ -0,0 +1,31 @@ +# ServiceCollectionExtensions + +Namespace: Proffer.Email + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class ServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ServiceCollectionExtensions](./proffer.email.servicecollectionextensions.md) + +## Methods + +### **AddSendGridEmail(IServiceCollection)** + +Registers the Proffer.Email services to the N:SendGrid API. + +```csharp +public static IServiceCollection AddSendGridEmail(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/email/smtp/index.md b/docs/api/email/smtp/index.md new file mode 100644 index 0000000..d3d3abc --- /dev/null +++ b/docs/api/email/smtp/index.md @@ -0,0 +1,11 @@ +# Proffer.Email.Smtp + +## Proffer.Email + +[SmtpEmailServiceCollectionExtensions](./proffer.email.smtpemailservicecollectionextensions.md) + +## Proffer.Email.Smtp + +[SmtpEmailProvider](./proffer.email.smtp.smtpemailprovider.md) + +[SmtpEmailProviderType](./proffer.email.smtp.smtpemailprovidertype.md) diff --git a/docs/api/email/smtp/proffer.email.smtp.smtpemailprovider.md b/docs/api/email/smtp/proffer.email.smtp.smtpemailprovider.md new file mode 100644 index 0000000..23a7cad --- /dev/null +++ b/docs/api/email/smtp/proffer.email.smtp.smtpemailprovider.md @@ -0,0 +1,144 @@ +# SmtpEmailProvider + +Namespace: Proffer.Email.Smtp + +A provider that sends email to a SMTP server with N:MailKit. + +```csharp +public class SmtpEmailProvider : Proffer.Email.IEmailProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [SmtpEmailProvider](./proffer.email.smtp.smtpemailprovider.md)
+Implements IEmailProvider + +## Constructors + +### **SmtpEmailProvider(IServiceProvider, IEmailProviderOptions)** + +Initializes a new instance of the [SmtpEmailProvider](./proffer.email.smtp.smtpemailprovider.md) class. + +```csharp +public SmtpEmailProvider(IServiceProvider serviceProvider, IEmailProviderOptions options) +``` + +#### Parameters + +`serviceProvider` IServiceProvider
+The service provider. + +`options` IEmailProviderOptions
+The options. + +#### Exceptions + +[ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception)
+ +[ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception)
+ +## Methods + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SendEmailAsync(IEmailAddress, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, IEnumerable<IEmailAddress>, String, String, String, IEnumerable<IEmailAttachment>, IEmailAddress)** + +Sends an email. + +```csharp +public Task SendEmailAsync(IEmailAddress from, IEnumerable recipients, IEnumerable ccRecipients, IEnumerable bccRecipients, string subject, string bodyText, string bodyHtml, IEnumerable attachments, IEmailAddress replyTo) +``` + +#### Parameters + +`from` IEmailAddress
+The sender email address. + +`recipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The email recipients. + +`ccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The CC email recipients. + +`bccRecipients` [IEnumerable<IEmailAddress>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The BCC email recipients. + +`subject` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The subject. + +`bodyText` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as plain text. + +`bodyHtml` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The body as HTML. + +`attachments` [IEnumerable<IEmailAttachment>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The file attachments. + +`replyTo` IEmailAddress
+The reply-to email address. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
diff --git a/docs/api/email/smtp/proffer.email.smtp.smtpemailprovidertype.md b/docs/api/email/smtp/proffer.email.smtp.smtpemailprovidertype.md new file mode 100644 index 0000000..2d7ccdc --- /dev/null +++ b/docs/api/email/smtp/proffer.email.smtp.smtpemailprovidertype.md @@ -0,0 +1,62 @@ +# SmtpEmailProviderType + +Namespace: Proffer.Email.Smtp + +Builds [SmtpEmailProvider](./proffer.email.smtp.smtpemailprovider.md). + +```csharp +public class SmtpEmailProviderType : Proffer.Email.IEmailProviderType +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [SmtpEmailProviderType](./proffer.email.smtp.smtpemailprovidertype.md)
+Implements IEmailProviderType + +## Properties + +### **Name** + +Gets the name. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **SmtpEmailProviderType(IServiceProvider)** + +Initializes a new instance of the [SmtpEmailProviderType](./proffer.email.smtp.smtpemailprovidertype.md) class. + +```csharp +public SmtpEmailProviderType(IServiceProvider serviceProvider) +``` + +#### Parameters + +`serviceProvider` IServiceProvider
+The service provider. + +## Methods + +### **BuildProvider(IEmailProviderOptions)** + +Builds the provider. + +```csharp +public IEmailProvider BuildProvider(IEmailProviderOptions providerOptions) +``` + +#### Parameters + +`providerOptions` IEmailProviderOptions
+The provider options. + +#### Returns + +IEmailProvider
+ + A new . diff --git a/docs/api/email/smtp/proffer.email.smtpemailservicecollectionextensions.md b/docs/api/email/smtp/proffer.email.smtpemailservicecollectionextensions.md new file mode 100644 index 0000000..b81d50f --- /dev/null +++ b/docs/api/email/smtp/proffer.email.smtpemailservicecollectionextensions.md @@ -0,0 +1,31 @@ +# SmtpEmailServiceCollectionExtensions + +Namespace: Proffer.Email + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class SmtpEmailServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [SmtpEmailServiceCollectionExtensions](./proffer.email.smtpemailservicecollectionextensions.md) + +## Methods + +### **AddSmtpEmail(IServiceCollection)** + +Registers the Proffer.Email services to a SMTP server with N:MailKit. + +```csharp +public static IServiceCollection AddSmtpEmail(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 0000000..c967928 --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,34 @@ +--- +title: "API documentation" +permalink: /api +layout: single +author_profile: false +toc: true +toc_sticky: true +--- + +## Core libraries + +- [Proffer](/api/core) +- [Proffer.Azure](/api/core/azure) + +## Storage + +- [Proffer.Storage](/api/storage) +- [Proffer.Storage.Azure.Blobs](/api/storage/azure/blobs) +- [Proffer.Storage.FileSystem](/api/storage/filesystem) +- [Proffer.Storage.FileSystem.Properties.Json](/api/storage/filesystem/properties/json) +- [Proffer.Storage.FileSystem.Server](/api/storage/filesystem/server) + +## Templating + +- [Proffer.Templating](/api/templating) +- [Proffer.Templating.Handlebars](/api/templating/handlebars) +- [Proffer.Templating.Mustache](/api/templating/mustache) + +## Email + +- [Proffer.Email](/api/email) +- [Proffer.Email.Smtp](/api/email/smtp) +- [Proffer.Email.SendGrid](/api/email/sendgrid) +- [Proffer.Email.InMemory](/api/email/in-memory) diff --git a/docs/api/storage/azure/blobs/index.md b/docs/api/storage/azure/blobs/index.md new file mode 100644 index 0000000..5283b11 --- /dev/null +++ b/docs/api/storage/azure/blobs/index.md @@ -0,0 +1,31 @@ +# Proffer.Storage.Azure.Blobs + +## Proffer.Storage + +[AzureBlobsStorageServiceCollectionExtensions](./proffer.storage.azureblobsstorageservicecollectionextensions.md) + +## Proffer.Storage.Azure.Blobs + +[AzureBlobsStorageProvider](./proffer.storage.azure.blobs.azureblobsstorageprovider.md) + +[AzureBlobsStore](./proffer.storage.azure.blobs.azureblobsstore.md) + +## Proffer.Storage.Azure.Blobs.Configuration + +[AzureBlobsParsedOptions](./proffer.storage.azure.blobs.configuration.azureblobsparsedoptions.md) + +[AzureBlobsProviderOptions](./proffer.storage.azure.blobs.configuration.azureblobsprovideroptions.md) + +[AzureBlobsScopedStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsscopedstoreoptions.md) + +[AzureBlobsStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md) + +## Proffer.Storage.Azure.Blobs.Internal + +[AzureBlobsFileProperties](./proffer.storage.azure.blobs.internal.azureblobsfileproperties.md) + +[AzureBlobsFileReference](./proffer.storage.azure.blobs.internal.azureblobsfilereference.md) + +[AzureBlobsListDirectoryWrapper](./proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md) + +[AzureBlobsListFileWrapper](./proffer.storage.azure.blobs.internal.azureblobslistfilewrapper.md) diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.azureblobsstorageprovider.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.azureblobsstorageprovider.md new file mode 100644 index 0000000..4026da8 --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.azureblobsstorageprovider.md @@ -0,0 +1,75 @@ +# AzureBlobsStorageProvider + +Namespace: Proffer.Storage.Azure.Blobs + +A provider to handle and build file stores pointing on an Azure Storage account. + +```csharp +public class AzureBlobsStorageProvider : Proffer.Storage.Internal.StorageProviderBase`4[[Proffer.Storage.Azure.Blobs.Configuration.AzureBlobsParsedOptions, Proffer.Storage.Azure.Blobs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.Azure.Blobs.Configuration.AzureBlobsProviderOptions, Proffer.Storage.Azure.Blobs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.Azure.Blobs.Configuration.AzureBlobsStoreOptions, Proffer.Storage.Azure.Blobs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.Azure.Blobs.Configuration.AzureBlobsScopedStoreOptions, Proffer.Storage.Azure.Blobs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Proffer.Storage.IStorageProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → StorageProviderBase<AzureBlobsParsedOptions, AzureBlobsProviderOptions, AzureBlobsStoreOptions, AzureBlobsScopedStoreOptions> → [AzureBlobsStorageProvider](./proffer.storage.azure.blobs.azureblobsstorageprovider.md)
+Implements IStorageProvider + +## Fields + +### **ProviderName** + +The [AzureBlobsStorageProvider](./proffer.storage.azure.blobs.azureblobsstorageprovider.md) name. + +```csharp +public static string ProviderName; +``` + +## Properties + +### **Name** + +Gets the name of this provider. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **AzureBlobsStorageProvider(IOptions<AzureBlobsParsedOptions>)** + +Initializes a new instance of the [AzureBlobsStorageProvider](./proffer.storage.azure.blobs.azureblobsstorageprovider.md) class. + +```csharp +public AzureBlobsStorageProvider(IOptions options) +``` + +#### Parameters + +`options` IOptions<AzureBlobsParsedOptions>
+The options. + +## Methods + +### **BuildStoreInternal(String, AzureBlobsStoreOptions)** + +Provider-specific build of a store with specific options. + +```csharp +protected IStore BuildStoreInternal(string storeName, AzureBlobsStoreOptions storeOptions) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`storeOptions` [AzureBlobsStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md)
+The store options. + +#### Returns + +IStore
+ + A configured . diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.azureblobsstore.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.azureblobsstore.md new file mode 100644 index 0000000..a99c27f --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.azureblobsstore.md @@ -0,0 +1,325 @@ +# AzureBlobsStore + +Namespace: Proffer.Storage.Azure.Blobs + +An Azure store allows to save, list or read files on a container in its configured [AzureBlobsStorageProvider](./proffer.storage.azure.blobs.azureblobsstorageprovider.md). + +```csharp +public class AzureBlobsStore : Proffer.Storage.IStore +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [AzureBlobsStore](./proffer.storage.azure.blobs.azureblobsstore.md)
+Implements IStore + +## Properties + +### **Name** + +Gets the name of the store. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **AzureBlobsStore(AzureBlobsStoreOptions)** + +Initializes a new instance of the [AzureBlobsStore](./proffer.storage.azure.blobs.azureblobsstore.md) class. + +```csharp +public AzureBlobsStore(AzureBlobsStoreOptions storeOptions) +``` + +#### Parameters + +`storeOptions` [AzureBlobsStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md)
+The store options. + +## Methods + +### **InitAsync(CancellationToken)** + +Initializes the store by creating a container in its Proffer.Storage.IStorageProvider. + +```csharp +public Task InitAsync(CancellationToken cancellationToken) +``` + +#### Parameters + +`cancellationToken` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
+ +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **ListAsync(String, Boolean, Boolean)** + +Lists the files under . + +```csharp +public ValueTask ListAsync(string path, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under . + +### **ListAsync(String, String, Boolean, Boolean)** + +Lists the files under matching the . + +```csharp +public ValueTask ListAsync(string path, string searchPattern, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`searchPattern` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The search pattern. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under matching the . + +### **GetAsync(IPrivateFileReference, Boolean)** + +Gets the file reference from path. + +```csharp +public ValueTask GetAsync(IPrivateFileReference file, bool withMetadata) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+ + The at path. + +### **GetAsync(Uri, Boolean)** + +Gets the file reference from URI. + +```csharp +public ValueTask GetAsync(Uri uri, bool withMetadata) +``` + +#### Parameters + +`uri` Uri
+The file uniform resource identifier (URI). + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+ + The at path. + +#### Exceptions + +[InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception)
+ +### **DeleteAsync(IPrivateFileReference)** + +Deletes the file. + +```csharp +public Task DeleteAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ +### **ReadAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<Stream>
+ + A containing the file content. + +### **ReadAllBytesAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAllBytesAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<Byte[]>
+ + A containing the file content. + +### **ReadAllTextAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAllTextAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<String>
+ + A containing the file content. + +### **SaveAsync(Byte[], IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public ValueTask SaveAsync(Byte[] data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The file content. + +`file` IPrivateFileReference
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` OverwritePolicy
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +#### Exceptions + +Proffer.Storage.Exceptions.FileAlreadyExistsException
+ +### **SaveAsync(Stream, IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public ValueTask SaveAsync(Stream data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The file content. + +`file` IPrivateFileReference
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` OverwritePolicy
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +#### Exceptions + +Proffer.Storage.Exceptions.FileAlreadyExistsException
+ +### **GetSharedAccessSignatureAsync(ISharedAccessPolicy)** + +Gets a shared access signature. + +```csharp +public ValueTask GetSharedAccessSignatureAsync(ISharedAccessPolicy policy) +``` + +#### Parameters + +`policy` ISharedAccessPolicy
+The policy. + +#### Returns + +ValueTask<String>
+ + A shared access signature to read or list the store files. diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsparsedoptions.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsparsedoptions.md new file mode 100644 index 0000000..8ebfb72 --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsparsedoptions.md @@ -0,0 +1,123 @@ +# AzureBlobsParsedOptions + +Namespace: Proffer.Storage.Azure.Blobs.Configuration + +Typed Azure Blobs options parsed from the dynamic configuration. + +```csharp +public class AzureBlobsParsedOptions : Proffer.Storage.Configuration.IParsedOptions`3[[Proffer.Storage.Azure.Blobs.Configuration.AzureBlobsProviderOptions, Proffer.Storage.Azure.Blobs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.Azure.Blobs.Configuration.AzureBlobsStoreOptions, Proffer.Storage.Azure.Blobs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.Azure.Blobs.Configuration.AzureBlobsScopedStoreOptions, Proffer.Storage.Azure.Blobs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [AzureBlobsParsedOptions](./proffer.storage.azure.blobs.configuration.azureblobsparsedoptions.md)
+Implements IParsedOptions<AzureBlobsProviderOptions, AzureBlobsStoreOptions, AzureBlobsScopedStoreOptions> + +## Properties + +### **Name** + +Gets the name. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionStrings** + +Gets or sets the connection strings. + +```csharp +public IReadOnlyDictionary ConnectionStrings { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedProviders** + +Gets or sets the parsed provider instances options. + +```csharp +public IReadOnlyDictionary ParsedProviders { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, AzureBlobsProviderOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedStores** + +Gets or sets the parsed stores options. + +```csharp +public IReadOnlyDictionary ParsedStores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, AzureBlobsStoreOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedScopedStores** + +Gets or sets the parsed scoped stores options. + +```csharp +public IReadOnlyDictionary ParsedScopedStores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, AzureBlobsScopedStoreOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +## Constructors + +### **AzureBlobsParsedOptions()** + + + +```csharp +public AzureBlobsParsedOptions() +``` + +## Methods + +### **BindProviderOptions(AzureBlobsProviderOptions)** + +Binds the provider instance options. + +```csharp +public void BindProviderOptions(AzureBlobsProviderOptions providerInstanceOptions) +``` + +#### Parameters + +`providerInstanceOptions` [AzureBlobsProviderOptions](./proffer.storage.azure.blobs.configuration.azureblobsprovideroptions.md)
+The provider instance options. + +#### Exceptions + +Proffer.Storage.Exceptions.BadProviderConfiguration
+ +### **BindStoreOptions(AzureBlobsStoreOptions, AzureBlobsProviderOptions)** + +Binds the store options. + +```csharp +public void BindStoreOptions(AzureBlobsStoreOptions storeOptions, AzureBlobsProviderOptions providerInstanceOptions) +``` + +#### Parameters + +`storeOptions` [AzureBlobsStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md)
+The store options. + +`providerInstanceOptions` [AzureBlobsProviderOptions](./proffer.storage.azure.blobs.configuration.azureblobsprovideroptions.md)
+The provider instance options. + +#### Exceptions + +Proffer.Storage.Exceptions.BadStoreConfiguration
diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsprovideroptions.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsprovideroptions.md new file mode 100644 index 0000000..8f9b937 --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsprovideroptions.md @@ -0,0 +1,72 @@ +# AzureBlobsProviderOptions + +Namespace: Proffer.Storage.Azure.Blobs.Configuration + +Options for an [AzureBlobsStorageProvider](./proffer.storage.azure.blobs.azureblobsstorageprovider.md). + +```csharp +public class AzureBlobsProviderOptions : Proffer.Configuration.ProviderOptions, Proffer.Configuration.IProviderOptions, Proffer.Configuration.INamedElementOptions, Proffer.Azure.Configuration.IAzureStorageOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → ProviderOptions → [AzureBlobsProviderOptions](./proffer.storage.azure.blobs.configuration.azureblobsprovideroptions.md)
+Implements IProviderOptions, INamedElementOptions, IAzureStorageOptions + +## Properties + +### **ConnectionString** + +Gets or sets the connection string. + +```csharp +public string ConnectionString { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionStringName** + +Gets or sets the name of the connection string to reference. + +```csharp +public string ConnectionStringName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + + + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Type** + + + +```csharp +public string Type { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **AzureBlobsProviderOptions()** + + + +```csharp +public AzureBlobsProviderOptions() +``` diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsscopedstoreoptions.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsscopedstoreoptions.md new file mode 100644 index 0000000..b703c0c --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsscopedstoreoptions.md @@ -0,0 +1,120 @@ +# AzureBlobsScopedStoreOptions + +Namespace: Proffer.Storage.Azure.Blobs.Configuration + +Options for a scoped [AzureBlobsStore](./proffer.storage.azure.blobs.azureblobsstore.md). + +```csharp +public class AzureBlobsScopedStoreOptions : AzureBlobsStoreOptions, Proffer.Storage.Configuration.IStoreOptions, Proffer.Configuration.INamedElementOptions, Proffer.Azure.Configuration.IAzureStorageOptions, Proffer.Storage.Configuration.IScopedStoreOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → StoreOptions → [AzureBlobsStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md) → [AzureBlobsScopedStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsscopedstoreoptions.md)
+Implements IStoreOptions, INamedElementOptions, IAzureStorageOptions, IScopedStoreOptions + +## Properties + +### **FolderNameFormat** + +Gets the folder name format. + +```csharp +public string FolderNameFormat { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionString** + +Gets or sets the connection string. + +```csharp +public string ConnectionString { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionStringName** + +Gets or sets the name of the connection string to reference. + +```csharp +public string ConnectionStringName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + + + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderName** + + + +```csharp +public string ProviderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderType** + + + +```csharp +public string ProviderType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AccessLevel** + + + +```csharp +public AccessLevel AccessLevel { get; set; } +``` + +#### Property Value + +AccessLevel
+ +### **FolderName** + + + +```csharp +public string FolderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **AzureBlobsScopedStoreOptions()** + + + +```csharp +public AzureBlobsScopedStoreOptions() +``` diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md new file mode 100644 index 0000000..968c53a --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md @@ -0,0 +1,133 @@ +# AzureBlobsStoreOptions + +Namespace: Proffer.Storage.Azure.Blobs.Configuration + +Options for an [AzureBlobsStore](./proffer.storage.azure.blobs.azureblobsstore.md). + +```csharp +public class AzureBlobsStoreOptions : Proffer.Storage.Configuration.StoreOptions, Proffer.Storage.Configuration.IStoreOptions, Proffer.Configuration.INamedElementOptions, Proffer.Azure.Configuration.IAzureStorageOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → StoreOptions → [AzureBlobsStoreOptions](./proffer.storage.azure.blobs.configuration.azureblobsstoreoptions.md)
+Implements IStoreOptions, INamedElementOptions, IAzureStorageOptions + +## Properties + +### **ConnectionString** + +Gets or sets the connection string. + +```csharp +public string ConnectionString { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionStringName** + +Gets or sets the name of the connection string to reference. + +```csharp +public string ConnectionStringName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + + + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderName** + + + +```csharp +public string ProviderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderType** + + + +```csharp +public string ProviderType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AccessLevel** + + + +```csharp +public AccessLevel AccessLevel { get; set; } +``` + +#### Property Value + +AccessLevel
+ +### **FolderName** + + + +```csharp +public string FolderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **AzureBlobsStoreOptions()** + + + +```csharp +public AzureBlobsStoreOptions() +``` + +## Methods + +### **Validate(Boolean)** + +Validates the options. + +```csharp +public IEnumerable Validate(bool throwOnError) +``` + +#### Parameters + +`throwOnError` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, throws an exception when the validation fails with any . + +#### Returns + +[IEnumerable<IOptionError>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ + The returned by the validation, if any. + +#### Exceptions + +Proffer.Storage.Exceptions.BadStoreConfiguration
diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobsfileproperties.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobsfileproperties.md new file mode 100644 index 0000000..c847c9f --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobsfileproperties.md @@ -0,0 +1,146 @@ +# AzureBlobsFileProperties + +Namespace: Proffer.Storage.Azure.Blobs.Internal + +File common properties with metadata stored on Azure Blobs. + +```csharp +public class AzureBlobsFileProperties : Proffer.Storage.IFileProperties +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [AzureBlobsFileProperties](./proffer.storage.azure.blobs.internal.azureblobsfileproperties.md)
+Implements IFileProperties + +## Properties + +### **LastModified** + +Gets the last modified time. + +```csharp +public Nullable LastModified { get; private set; } +``` + +#### Property Value + +[Nullable<DateTimeOffset>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+ +### **Length** + +Gets the length of the content. + +```csharp +public long Length { get; private set; } +``` + +#### Property Value + +[Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64)
+ +### **ContentType** + +Gets or sets the content-type. + +```csharp +public string ContentType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ETag** + +Gets the etag. + +```csharp +public string ETag { get; private set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **CacheControl** + +Gets or sets the cache control. + +```csharp +public string CacheControl { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ContentMD5** + +Gets the MD5 digest of the content. + +```csharp +public string ContentMD5 { get; private set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Metadata** + +Gets the metadata. + +```csharp +public IDictionary Metadata { get; } +``` + +#### Property Value + +[IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+ +## Constructors + +### **AzureBlobsFileProperties(BlobClient, BlobProperties)** + +Initializes a new instance of the [AzureBlobsFileProperties](./proffer.storage.azure.blobs.internal.azureblobsfileproperties.md) class. + +```csharp +public AzureBlobsFileProperties(BlobClient blobClient, BlobProperties blobProperties) +``` + +#### Parameters + +`blobClient` BlobClient
+The Azure Blobs client. + +`blobProperties` BlobProperties
+The blob properties. + +### **AzureBlobsFileProperties(BlobClient, BlobItem)** + +Initializes a new instance of the [AzureBlobsFileProperties](./proffer.storage.azure.blobs.internal.azureblobsfileproperties.md) class. + +```csharp +public AzureBlobsFileProperties(BlobClient blobClient, BlobItem blobItem) +``` + +#### Parameters + +`blobClient` BlobClient
+The Azure Blobs client. + +`blobItem` BlobItem
+The blob item from listing. + +## Methods + +### **SaveAsync()** + + + +```csharp +internal Task SaveAsync() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobsfilereference.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobsfilereference.md new file mode 100644 index 0000000..bf9e5a5 --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobsfilereference.md @@ -0,0 +1,221 @@ +# AzureBlobsFileReference + +Namespace: Proffer.Storage.Azure.Blobs.Internal + +A reference of a stored file at a given path on Azure Blobs. + +```csharp +public class AzureBlobsFileReference : Proffer.Storage.IFileReference, Proffer.Storage.IPrivateFileReference +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [AzureBlobsFileReference](./proffer.storage.azure.blobs.internal.azureblobsfilereference.md)
+Implements IFileReference, IPrivateFileReference + +## Properties + +### **Path** + +Gets the file path. + +```csharp +public string Path { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Properties** + +Gets the properties. + +```csharp +public IFileProperties Properties { get; } +``` + +#### Property Value + +IFileProperties
+ +### **PublicUrl** + +Gets the public URL. + +```csharp +public string PublicUrl { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **AzureBlobsFileReference(BlobClient, AzureBlobsFileProperties)** + +Initializes a new instance of the [AzureBlobsFileReference](./proffer.storage.azure.blobs.internal.azureblobsfilereference.md) class. + +```csharp +public AzureBlobsFileReference(BlobClient blobClient, AzureBlobsFileProperties properties) +``` + +#### Parameters + +`blobClient` BlobClient
+The Azure Blobs client. + +`properties` [AzureBlobsFileProperties](./proffer.storage.azure.blobs.internal.azureblobsfileproperties.md)
+The properties, if fetched. + +## Methods + +### **DeleteAsync()** + +Deletes the file. + +```csharp +public Task DeleteAsync() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **ReadAsync()** + +Reads the file content. + +```csharp +public ValueTask ReadAsync() +``` + +#### Returns + +ValueTask<Stream>
+ + A containing the file content. + +### **ReadInMemoryAsync()** + +Reads the file content in memory. + +```csharp +public ValueTask ReadInMemoryAsync() +``` + +#### Returns + +ValueTask<MemoryStream>
+A new containing the file content. + +### **UpdateAsync(Stream)** + +Updates the file content with the given [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream). + +```csharp +public Task UpdateAsync(Stream stream) +``` + +#### Parameters + +`stream` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The new file content. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **ReadToStreamAsync(Stream)** + +Reads the file content into the given stream. + +```csharp +public Task ReadToStreamAsync(Stream targetStream) +``` + +#### Parameters + +`targetStream` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The target stream. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ +### **ReadAllTextAsync()** + +Reads the file content. + +```csharp +public ValueTask ReadAllTextAsync() +``` + +#### Returns + +ValueTask<String>
+ + A containing the file content. + +### **ReadAllBytesAsync()** + +Reads the file content. + +```csharp +public ValueTask ReadAllBytesAsync() +``` + +#### Returns + +ValueTask<Byte[]>
+ + A containing the file content. + +### **SavePropertiesAsync()** + +Saves the file properties. + +```csharp +public Task SavePropertiesAsync() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **GetSharedAccessSignature(ISharedAccessPolicy)** + +Gets a shared access signature. + +```csharp +public ValueTask GetSharedAccessSignature(ISharedAccessPolicy policy) +``` + +#### Parameters + +`policy` ISharedAccessPolicy
+The policy. + +#### Returns + +ValueTask<String>
+ + A shared access signature to read file. + +### **FetchProperties()** + +Fetches the file properties. + +```csharp +public Task FetchProperties() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md new file mode 100644 index 0000000..cf20419 --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md @@ -0,0 +1,138 @@ +# AzureBlobsListDirectoryWrapper + +Namespace: Proffer.Storage.Azure.Blobs.Internal + +Represents a directory in a being-listed [AzureBlobsStore](./proffer.storage.azure.blobs.azureblobsstore.md). + +```csharp +public class AzureBlobsListDirectoryWrapper : Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → FileSystemInfoBase → DirectoryInfoBase → [AzureBlobsListDirectoryWrapper](./proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md) + +## Properties + +### **FullName** + +A string containing the full path of the directory. + +```csharp +public string FullName { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + +A string containing the name of the directory. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ParentDirectory** + +The parent directory for the current directory. + +```csharp +public DirectoryInfoBase ParentDirectory { get; } +``` + +#### Property Value + +DirectoryInfoBase
+ +## Constructors + +### **AzureBlobsListDirectoryWrapper(FileSystemInfoBase)** + +Initializes a new instance of the [AzureBlobsListDirectoryWrapper](./proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md) class. + +```csharp +public AzureBlobsListDirectoryWrapper(FileSystemInfoBase childrens) +``` + +#### Parameters + +`childrens` FileSystemInfoBase
+The childrens. + +### **AzureBlobsListDirectoryWrapper(String, Dictionary<String, AzureBlobsFileReference>)** + +Initializes a new instance of the [AzureBlobsListDirectoryWrapper](./proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md) class. + +```csharp +public AzureBlobsListDirectoryWrapper(string path, Dictionary files) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The directory path. + +`files` [Dictionary<String, AzureBlobsFileReference>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2)
+The files. + +## Methods + +### **EnumerateFileSystemInfos()** + +Enumerates all files and directories in the directory. + +```csharp +public IEnumerable EnumerateFileSystemInfos() +``` + +#### Returns + +[IEnumerable<FileSystemInfoBase>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ + Collection of files and directories + +### **GetDirectory(String)** + +Returns an instance of Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase that represents a subdirectory. + +```csharp +public DirectoryInfoBase GetDirectory(string path) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The directory name + +#### Returns + +DirectoryInfoBase
+ + Instance of even if directory does not exist + +#### Exceptions + +[NotImplementedException](https://docs.microsoft.com/en-us/dotnet/api/system.notimplementedexception)
+ +### **GetFile(String)** + +Returns an instance of Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase that represents a file in the directory. + +```csharp +public FileInfoBase GetFile(string path) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file name + +#### Returns + +FileInfoBase
+ + Instance of even if file does not exist diff --git a/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobslistfilewrapper.md b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobslistfilewrapper.md new file mode 100644 index 0000000..7dc4996 --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azure.blobs.internal.azureblobslistfilewrapper.md @@ -0,0 +1,67 @@ +# AzureBlobsListFileWrapper + +Namespace: Proffer.Storage.Azure.Blobs.Internal + +Represents a file in a being-listed [AzureBlobsStore](./proffer.storage.azure.blobs.azureblobsstore.md). + +```csharp +public class AzureBlobsListFileWrapper : Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → FileSystemInfoBase → FileInfoBase → [AzureBlobsListFileWrapper](./proffer.storage.azure.blobs.internal.azureblobslistfilewrapper.md) + +## Properties + +### **FullName** + +A string containing the full path of the file. + +```csharp +public string FullName { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + +A string containing the name of the file. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ParentDirectory** + +The parent directory for the current file. + +```csharp +public DirectoryInfoBase ParentDirectory { get; } +``` + +#### Property Value + +DirectoryInfoBase
+ +## Constructors + +### **AzureBlobsListFileWrapper(AzureBlobsFileReference, AzureBlobsListDirectoryWrapper)** + +Initializes a new instance of the [AzureBlobsListFileWrapper](./proffer.storage.azure.blobs.internal.azureblobslistfilewrapper.md) class. + +```csharp +public AzureBlobsListFileWrapper(AzureBlobsFileReference file, AzureBlobsListDirectoryWrapper parent) +``` + +#### Parameters + +`file` [AzureBlobsFileReference](./proffer.storage.azure.blobs.internal.azureblobsfilereference.md)
+The file reference. + +`parent` [AzureBlobsListDirectoryWrapper](./proffer.storage.azure.blobs.internal.azureblobslistdirectorywrapper.md)
+The parent directory. diff --git a/docs/api/storage/azure/blobs/proffer.storage.azureblobsstorageservicecollectionextensions.md b/docs/api/storage/azure/blobs/proffer.storage.azureblobsstorageservicecollectionextensions.md new file mode 100644 index 0000000..186ab23 --- /dev/null +++ b/docs/api/storage/azure/blobs/proffer.storage.azureblobsstorageservicecollectionextensions.md @@ -0,0 +1,31 @@ +# AzureBlobsStorageServiceCollectionExtensions + +Namespace: Proffer.Storage + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class AzureBlobsStorageServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [AzureBlobsStorageServiceCollectionExtensions](./proffer.storage.azureblobsstorageservicecollectionextensions.md) + +## Methods + +### **AddAzureStorage(IServiceCollection)** + +Registers the Proffer.Storage services to Azure Blobs. + +```csharp +public static IServiceCollection AddAzureStorage(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/storage/filesystem/index.md b/docs/api/storage/filesystem/index.md new file mode 100644 index 0000000..a8c121b --- /dev/null +++ b/docs/api/storage/filesystem/index.md @@ -0,0 +1,35 @@ +# Proffer.Storage.FileSystem + +## Proffer.Storage + +[FileSystemStorageServiceCollectionExtensions](./proffer.storage.filesystemstorageservicecollectionextensions.md) + +## Proffer.Storage.FileSystem + +[FileSystemStorageProvider](./proffer.storage.filesystem.filesystemstorageprovider.md) + +[FileSystemStore](./proffer.storage.filesystem.filesystemstore.md) + +[IExtendedPropertiesProvider](./proffer.storage.filesystem.iextendedpropertiesprovider.md) + +[IPublicUrlProvider](./proffer.storage.filesystem.ipublicurlprovider.md) + +[NoExtendedPropertiesProvider](./proffer.storage.filesystem.noextendedpropertiesprovider.md) + +## Proffer.Storage.FileSystem.Configuration + +[FileSystemParsedOptions](./proffer.storage.filesystem.configuration.filesystemparsedoptions.md) + +[FileSystemProviderOptions](./proffer.storage.filesystem.configuration.filesystemprovideroptions.md) + +[FileSystemScopedStoreOptions](./proffer.storage.filesystem.configuration.filesystemscopedstoreoptions.md) + +[FileSystemStoreOptions](./proffer.storage.filesystem.configuration.filesystemstoreoptions.md) + +## Proffer.Storage.FileSystem.Internal + +[FileExtendedProperties](./proffer.storage.filesystem.internal.fileextendedproperties.md) + +[FileSystemFileProperties](./proffer.storage.filesystem.internal.filesystemfileproperties.md) + +[FileSystemFileReference](./proffer.storage.filesystem.internal.filesystemfilereference.md) diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemparsedoptions.md b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemparsedoptions.md new file mode 100644 index 0000000..0c28beb --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemparsedoptions.md @@ -0,0 +1,127 @@ +# FileSystemParsedOptions + +Namespace: Proffer.Storage.FileSystem.Configuration + +Typed File System options parsed from the dynamic configuration. + +```csharp +public class FileSystemParsedOptions : Proffer.Storage.Configuration.IParsedOptions`3[[Proffer.Storage.FileSystem.Configuration.FileSystemProviderOptions, Proffer.Storage.FileSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.FileSystem.Configuration.FileSystemStoreOptions, Proffer.Storage.FileSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.FileSystem.Configuration.FileSystemScopedStoreOptions, Proffer.Storage.FileSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemParsedOptions](./proffer.storage.filesystem.configuration.filesystemparsedoptions.md)
+Implements IParsedOptions<FileSystemProviderOptions, FileSystemStoreOptions, FileSystemScopedStoreOptions> + +## Properties + +### **Name** + +Gets the name. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionStrings** + +Gets or sets the connection strings. + +```csharp +public IReadOnlyDictionary ConnectionStrings { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedProviders** + +Gets or sets the parsed provider instances options. + +```csharp +public IReadOnlyDictionary ParsedProviders { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, FileSystemProviderOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedStores** + +Gets or sets the parsed stores options. + +```csharp +public IReadOnlyDictionary ParsedStores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, FileSystemStoreOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedScopedStores** + +Gets or sets the parsed scoped stores options. + +```csharp +public IReadOnlyDictionary ParsedScopedStores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, FileSystemScopedStoreOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **RootPath** + +Gets or sets the root path. + +```csharp +public string RootPath { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **FileSystemParsedOptions()** + + + +```csharp +public FileSystemParsedOptions() +``` + +## Methods + +### **BindProviderOptions(FileSystemProviderOptions)** + +Binds the provider instance options. + +```csharp +public void BindProviderOptions(FileSystemProviderOptions providerInstanceOptions) +``` + +#### Parameters + +`providerInstanceOptions` [FileSystemProviderOptions](./proffer.storage.filesystem.configuration.filesystemprovideroptions.md)
+The provider instance options. + +### **BindStoreOptions(FileSystemStoreOptions, FileSystemProviderOptions)** + +Binds the store options. + +```csharp +public void BindStoreOptions(FileSystemStoreOptions storeOptions, FileSystemProviderOptions providerInstanceOptions) +``` + +#### Parameters + +`storeOptions` [FileSystemStoreOptions](./proffer.storage.filesystem.configuration.filesystemstoreoptions.md)
+The store options. + +`providerInstanceOptions` [FileSystemProviderOptions](./proffer.storage.filesystem.configuration.filesystemprovideroptions.md)
+The provider instance options. diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemprovideroptions.md b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemprovideroptions.md new file mode 100644 index 0000000..1ac5ad3 --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemprovideroptions.md @@ -0,0 +1,60 @@ +# FileSystemProviderOptions + +Namespace: Proffer.Storage.FileSystem.Configuration + +Options for a [FileSystemStorageProvider](./proffer.storage.filesystem.filesystemstorageprovider.md). + +```csharp +public class FileSystemProviderOptions : Proffer.Configuration.ProviderOptions, Proffer.Configuration.IProviderOptions, Proffer.Configuration.INamedElementOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → ProviderOptions → [FileSystemProviderOptions](./proffer.storage.filesystem.configuration.filesystemprovideroptions.md)
+Implements IProviderOptions, INamedElementOptions + +## Properties + +### **RootPath** + +Gets or sets the root path. + +```csharp +public string RootPath { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + + + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Type** + + + +```csharp +public string Type { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **FileSystemProviderOptions()** + + + +```csharp +public FileSystemProviderOptions() +``` diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemscopedstoreoptions.md b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemscopedstoreoptions.md new file mode 100644 index 0000000..3b43e20 --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemscopedstoreoptions.md @@ -0,0 +1,120 @@ +# FileSystemScopedStoreOptions + +Namespace: Proffer.Storage.FileSystem.Configuration + +Options for a scoped [FileSystemStore](./proffer.storage.filesystem.filesystemstore.md). + +```csharp +public class FileSystemScopedStoreOptions : FileSystemStoreOptions, Proffer.Storage.Configuration.IStoreOptions, Proffer.Configuration.INamedElementOptions, Proffer.Storage.Configuration.IScopedStoreOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → StoreOptions → [FileSystemStoreOptions](./proffer.storage.filesystem.configuration.filesystemstoreoptions.md) → [FileSystemScopedStoreOptions](./proffer.storage.filesystem.configuration.filesystemscopedstoreoptions.md)
+Implements IStoreOptions, INamedElementOptions, IScopedStoreOptions + +## Properties + +### **FolderNameFormat** + +Gets the folder name format. + +```csharp +public string FolderNameFormat { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **RootPath** + +Gets or sets the root path. + +```csharp +public string RootPath { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AbsolutePath** + +Gets the absolute path. + +```csharp +public string AbsolutePath { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + + + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderName** + + + +```csharp +public string ProviderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderType** + + + +```csharp +public string ProviderType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AccessLevel** + + + +```csharp +public AccessLevel AccessLevel { get; set; } +``` + +#### Property Value + +AccessLevel
+ +### **FolderName** + + + +```csharp +public string FolderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **FileSystemScopedStoreOptions()** + + + +```csharp +public FileSystemScopedStoreOptions() +``` diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemstoreoptions.md b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemstoreoptions.md new file mode 100644 index 0000000..0f87cce --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.configuration.filesystemstoreoptions.md @@ -0,0 +1,133 @@ +# FileSystemStoreOptions + +Namespace: Proffer.Storage.FileSystem.Configuration + +Options for an [FileSystemStore](./proffer.storage.filesystem.filesystemstore.md). + +```csharp +public class FileSystemStoreOptions : Proffer.Storage.Configuration.StoreOptions, Proffer.Storage.Configuration.IStoreOptions, Proffer.Configuration.INamedElementOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → StoreOptions → [FileSystemStoreOptions](./proffer.storage.filesystem.configuration.filesystemstoreoptions.md)
+Implements IStoreOptions, INamedElementOptions + +## Properties + +### **RootPath** + +Gets or sets the root path. + +```csharp +public string RootPath { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AbsolutePath** + +Gets the absolute path. + +```csharp +public string AbsolutePath { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + + + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderName** + + + +```csharp +public string ProviderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderType** + + + +```csharp +public string ProviderType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AccessLevel** + + + +```csharp +public AccessLevel AccessLevel { get; set; } +``` + +#### Property Value + +AccessLevel
+ +### **FolderName** + + + +```csharp +public string FolderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **FileSystemStoreOptions()** + + + +```csharp +public FileSystemStoreOptions() +``` + +## Methods + +### **Validate(Boolean)** + +Validates the options. + +```csharp +public IEnumerable Validate(bool throwOnError) +``` + +#### Parameters + +`throwOnError` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, throws an exception when the validation fails with any . + +#### Returns + +[IEnumerable<IOptionError>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ + The returned by the validation, if any. + +#### Exceptions + +Proffer.Storage.Exceptions.BadStoreConfiguration
diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.filesystemstorageprovider.md b/docs/api/storage/filesystem/proffer.storage.filesystem.filesystemstorageprovider.md new file mode 100644 index 0000000..52aa92c --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.filesystemstorageprovider.md @@ -0,0 +1,81 @@ +# FileSystemStorageProvider + +Namespace: Proffer.Storage.FileSystem + +A provider to handle and build file stores pointing on a File System directory. + +```csharp +public class FileSystemStorageProvider : Proffer.Storage.Internal.StorageProviderBase`4[[Proffer.Storage.FileSystem.Configuration.FileSystemParsedOptions, Proffer.Storage.FileSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.FileSystem.Configuration.FileSystemProviderOptions, Proffer.Storage.FileSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.FileSystem.Configuration.FileSystemStoreOptions, Proffer.Storage.FileSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Proffer.Storage.FileSystem.Configuration.FileSystemScopedStoreOptions, Proffer.Storage.FileSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Proffer.Storage.IStorageProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → StorageProviderBase<FileSystemParsedOptions, FileSystemProviderOptions, FileSystemStoreOptions, FileSystemScopedStoreOptions> → [FileSystemStorageProvider](./proffer.storage.filesystem.filesystemstorageprovider.md)
+Implements IStorageProvider + +## Fields + +### **ProviderName** + +The [FileSystemStorageProvider](./proffer.storage.filesystem.filesystemstorageprovider.md) name. + +```csharp +public static string ProviderName; +``` + +## Properties + +### **Name** + +Gets the name of this provider. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **FileSystemStorageProvider(IOptions<FileSystemParsedOptions>, IPublicUrlProvider, IExtendedPropertiesProvider)** + +Initializes a new instance of the [FileSystemStorageProvider](./proffer.storage.filesystem.filesystemstorageprovider.md) class. + +```csharp +public FileSystemStorageProvider(IOptions options, IPublicUrlProvider publicUrlProvider, IExtendedPropertiesProvider extendedPropertiesProvider) +``` + +#### Parameters + +`options` IOptions<FileSystemParsedOptions>
+The options. + +`publicUrlProvider` [IPublicUrlProvider](./proffer.storage.filesystem.ipublicurlprovider.md)
+The public URL provider. + +`extendedPropertiesProvider` [IExtendedPropertiesProvider](./proffer.storage.filesystem.iextendedpropertiesprovider.md)
+The extended properties provider. + +## Methods + +### **BuildStoreInternal(String, FileSystemStoreOptions)** + +Provider-specific build of a store with specific options. + +```csharp +protected IStore BuildStoreInternal(string storeName, FileSystemStoreOptions storeOptions) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`storeOptions` [FileSystemStoreOptions](./proffer.storage.filesystem.configuration.filesystemstoreoptions.md)
+The store options. + +#### Returns + +IStore
+ + A configured . diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.filesystemstore.md b/docs/api/storage/filesystem/proffer.storage.filesystem.filesystemstore.md new file mode 100644 index 0000000..91f7cff --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.filesystemstore.md @@ -0,0 +1,331 @@ +# FileSystemStore + +Namespace: Proffer.Storage.FileSystem + +A File System store allows to save, list or read files on a container in its configured [FileSystemStorageProvider](./proffer.storage.filesystem.filesystemstorageprovider.md). + +```csharp +public class FileSystemStore : Proffer.Storage.IStore +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemStore](./proffer.storage.filesystem.filesystemstore.md)
+Implements IStore + +## Properties + +### **Name** + +Gets the name of the store. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **FileSystemStore(FileSystemStoreOptions, IPublicUrlProvider, IExtendedPropertiesProvider)** + +Initializes a new instance of the [FileSystemStore](./proffer.storage.filesystem.filesystemstore.md) class. + +```csharp +public FileSystemStore(FileSystemStoreOptions storeOptions, IPublicUrlProvider publicUrlProvider, IExtendedPropertiesProvider extendedPropertiesProvider) +``` + +#### Parameters + +`storeOptions` [FileSystemStoreOptions](./proffer.storage.filesystem.configuration.filesystemstoreoptions.md)
+The store options. + +`publicUrlProvider` [IPublicUrlProvider](./proffer.storage.filesystem.ipublicurlprovider.md)
+The public URL provider. + +`extendedPropertiesProvider` [IExtendedPropertiesProvider](./proffer.storage.filesystem.iextendedpropertiesprovider.md)
+The extended properties provider. + +## Methods + +### **InitAsync(CancellationToken)** + +Initializes the store by creating a container in its Proffer.Storage.IStorageProvider. + +```csharp +public Task InitAsync(CancellationToken cancellationToken) +``` + +#### Parameters + +`cancellationToken` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
+ +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **ListAsync(String, Boolean, Boolean)** + +Lists the files under . + +```csharp +public ValueTask ListAsync(string path, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under . + +### **ListAsync(String, String, Boolean, Boolean)** + +Lists the files under matching the . + +```csharp +public ValueTask ListAsync(string path, string searchPattern, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`searchPattern` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The search pattern. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under matching the . + +### **GetAsync(IPrivateFileReference, Boolean)** + +Gets the file reference from path. + +```csharp +public ValueTask GetAsync(IPrivateFileReference file, bool withMetadata) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+ + The at path. + +### **GetAsync(Uri, Boolean)** + +Gets the file reference from URI. + +```csharp +public ValueTask GetAsync(Uri uri, bool withMetadata) +``` + +#### Parameters + +`uri` Uri
+The file uniform resource identifier (URI). + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+ + The at path. + +#### Exceptions + +[InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception)
+ +### **DeleteAsync(IPrivateFileReference)** + +Deletes the file. + +```csharp +public Task DeleteAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ +### **ReadAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<Stream>
+ + A containing the file content. + +### **ReadAllBytesAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAllBytesAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<Byte[]>
+ + A containing the file content. + +### **ReadAllTextAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAllTextAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<String>
+ + A containing the file content. + +### **SaveAsync(Byte[], IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public ValueTask SaveAsync(Byte[] data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The file content. + +`file` IPrivateFileReference
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` OverwritePolicy
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +### **SaveAsync(Stream, IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public ValueTask SaveAsync(Stream data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The file content. + +`file` IPrivateFileReference
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` OverwritePolicy
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +#### Exceptions + +Proffer.Storage.Exceptions.FileAlreadyExistsException
+ +### **GetSharedAccessSignatureAsync(ISharedAccessPolicy)** + +Gets a shared access signature. + +```csharp +public ValueTask GetSharedAccessSignatureAsync(ISharedAccessPolicy policy) +``` + +#### Parameters + +`policy` ISharedAccessPolicy
+The policy. + +#### Returns + +ValueTask<String>
+ + A shared access signature to read or list the store files. + +#### Exceptions + +[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception)
diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.iextendedpropertiesprovider.md b/docs/api/storage/filesystem/proffer.storage.filesystem.iextendedpropertiesprovider.md new file mode 100644 index 0000000..42e6841 --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.iextendedpropertiesprovider.md @@ -0,0 +1,56 @@ +# IExtendedPropertiesProvider + +Namespace: Proffer.Storage.FileSystem + +Provides a way to store and retrieve extended file properties to match the requirements of Proffer.Storage.IFileProperties on a File System. + +```csharp +public interface IExtendedPropertiesProvider +``` + +## Methods + +### **GetExtendedPropertiesAsync(String, IPrivateFileReference)** + +Gets the extended properties of a file reference. + +```csharp +ValueTask GetExtendedPropertiesAsync(string storeAbsolutePath, IPrivateFileReference file) +``` + +#### Parameters + +`storeAbsolutePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The store absolute path. + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<FileExtendedProperties>
+A loaded instance or a default one if not found. + +### **SaveExtendedPropertiesAsync(String, IPrivateFileReference, FileExtendedProperties)** + +Saves the extended properties for a file reference. + +```csharp +Task SaveExtendedPropertiesAsync(string storeAbsolutePath, IPrivateFileReference file, FileExtendedProperties extendedProperties) +``` + +#### Parameters + +`storeAbsolutePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The store absolute path. + +`file` IPrivateFileReference
+The reference holding the file path. + +`extendedProperties` [FileExtendedProperties](./proffer.storage.filesystem.internal.fileextendedproperties.md)
+The extended properties. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.internal.fileextendedproperties.md b/docs/api/storage/filesystem/proffer.storage.filesystem.internal.fileextendedproperties.md new file mode 100644 index 0000000..e07c5aa --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.internal.fileextendedproperties.md @@ -0,0 +1,83 @@ +# FileExtendedProperties + +Namespace: Proffer.Storage.FileSystem.Internal + +Extends standard file properties to match the requirements of Proffer.Storage.IFileProperties. + +```csharp +public class FileExtendedProperties +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileExtendedProperties](./proffer.storage.filesystem.internal.fileextendedproperties.md) + +## Properties + +### **ContentType** + +Gets or sets the content-type. + +```csharp +public string ContentType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ETag** + +Gets or sets the etag. + +```csharp +public string ETag { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **CacheControl** + +Gets or sets the cache control. + +```csharp +public string CacheControl { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ContentMD5** + +Gets or sets the MD5 digest of the content. + +```csharp +public string ContentMD5 { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Metadata** + +Gets or sets the metadata. + +```csharp +public IDictionary Metadata { get; set; } +``` + +#### Property Value + +[IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+ +## Constructors + +### **FileExtendedProperties()** + +Initializes a new instance of the [FileExtendedProperties](./proffer.storage.filesystem.internal.fileextendedproperties.md) class. + +```csharp +public FileExtendedProperties() +``` diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.internal.filesystemfileproperties.md b/docs/api/storage/filesystem/proffer.storage.filesystem.internal.filesystemfileproperties.md new file mode 100644 index 0000000..040824a --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.internal.filesystemfileproperties.md @@ -0,0 +1,116 @@ +# FileSystemFileProperties + +Namespace: Proffer.Storage.FileSystem.Internal + +File common properties with metadata stored on a File System. + +```csharp +public class FileSystemFileProperties : Proffer.Storage.IFileProperties +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemFileProperties](./proffer.storage.filesystem.internal.filesystemfileproperties.md)
+Implements IFileProperties + +## Properties + +### **LastModified** + +Gets the last modified time. + +```csharp +public Nullable LastModified { get; } +``` + +#### Property Value + +[Nullable<DateTimeOffset>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+ +### **Length** + +Gets the length of the content. + +```csharp +public long Length { get; } +``` + +#### Property Value + +[Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64)
+ +### **ContentType** + +Gets or sets the content-type. + +```csharp +public string ContentType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ETag** + +Gets the etag. + +```csharp +public string ETag { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **CacheControl** + +Gets or sets the cache control. + +```csharp +public string CacheControl { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ContentMD5** + +Gets the MD5 digest of the content. + +```csharp +public string ContentMD5 { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Metadata** + +Gets the metadata. + +```csharp +public IDictionary Metadata { get; } +``` + +#### Property Value + +[IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+ +## Constructors + +### **FileSystemFileProperties(String, FileExtendedProperties)** + +Initializes a new instance of the [FileSystemFileProperties](./proffer.storage.filesystem.internal.filesystemfileproperties.md) class. + +```csharp +public FileSystemFileProperties(string fileSystemPath, FileExtendedProperties extendedProperties) +``` + +#### Parameters + +`fileSystemPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file system path. + +`extendedProperties` [FileExtendedProperties](./proffer.storage.filesystem.internal.fileextendedproperties.md)
+The extended properties. diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.internal.filesystemfilereference.md b/docs/api/storage/filesystem/proffer.storage.filesystem.internal.filesystemfilereference.md new file mode 100644 index 0000000..c13923b --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.internal.filesystemfilereference.md @@ -0,0 +1,234 @@ +# FileSystemFileReference + +Namespace: Proffer.Storage.FileSystem.Internal + +A reference of a stored file at a given path on a File System. + +```csharp +public class FileSystemFileReference : Proffer.Storage.IFileReference, Proffer.Storage.IPrivateFileReference +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemFileReference](./proffer.storage.filesystem.internal.filesystemfilereference.md)
+Implements IFileReference, IPrivateFileReference + +## Properties + +### **FileSystemPath** + +Gets the file system path. + +```csharp +public string FileSystemPath { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Path** + +Gets the file path. + +```csharp +public string Path { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **PublicUrl** + +Gets the public URL. + +```csharp +public string PublicUrl { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Properties** + +Gets the properties. + +```csharp +public IFileProperties Properties { get; } +``` + +#### Property Value + +IFileProperties
+ +## Constructors + +### **FileSystemFileReference(String, String, FileSystemStore, Boolean, FileExtendedProperties, IPublicUrlProvider, IExtendedPropertiesProvider)** + +Initializes a new instance of the [FileSystemFileReference](./proffer.storage.filesystem.internal.filesystemfilereference.md) class. + +```csharp +public FileSystemFileReference(string filePath, string path, FileSystemStore store, bool withMetadata, FileExtendedProperties extendedProperties, IPublicUrlProvider publicUrlProvider, IExtendedPropertiesProvider extendedPropertiesProvider) +``` + +#### Parameters + +`filePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file system path. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`store` [FileSystemStore](./proffer.storage.filesystem.filesystemstore.md)
+The store. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, the metadata for the file have been fetched. + +`extendedProperties` [FileExtendedProperties](./proffer.storage.filesystem.internal.fileextendedproperties.md)
+The extended properties. + +`publicUrlProvider` [IPublicUrlProvider](./proffer.storage.filesystem.ipublicurlprovider.md)
+The public URL provider. + +`extendedPropertiesProvider` [IExtendedPropertiesProvider](./proffer.storage.filesystem.iextendedpropertiesprovider.md)
+The extended properties provider. + +## Methods + +### **DeleteAsync()** + +Deletes the file. + +```csharp +public Task DeleteAsync() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **ReadAllBytesAsync()** + +Reads the file content. + +```csharp +public ValueTask ReadAllBytesAsync() +``` + +#### Returns + +ValueTask<Byte[]>
+ + A containing the file content. + +### **ReadAllTextAsync()** + +Reads the file content. + +```csharp +public ValueTask ReadAllTextAsync() +``` + +#### Returns + +ValueTask<String>
+ + A containing the file content. + +### **ReadAsync()** + +Reads the file content. + +```csharp +public ValueTask ReadAsync() +``` + +#### Returns + +ValueTask<Stream>
+ + A containing the file content. + +### **ReadToStreamAsync(Stream)** + +Reads the file content into the given stream. + +```csharp +public Task ReadToStreamAsync(Stream targetStream) +``` + +#### Parameters + +`targetStream` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The target stream. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ +### **UpdateAsync(Stream)** + +Updates the file content with the given [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream). + +```csharp +public Task UpdateAsync(Stream stream) +``` + +#### Parameters + +`stream` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The new file content. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **SavePropertiesAsync()** + +Saves the file properties. + +```csharp +public Task SavePropertiesAsync() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **GetSharedAccessSignature(ISharedAccessPolicy)** + +Gets a shared access signature. + +```csharp +public ValueTask GetSharedAccessSignature(ISharedAccessPolicy policy) +``` + +#### Parameters + +`policy` ISharedAccessPolicy
+The policy. + +#### Returns + +ValueTask<String>
+A shared access signature to read file. + +### **FetchProperties()** + +Fetches the file properties. + +```csharp +public Task FetchProperties() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.ipublicurlprovider.md b/docs/api/storage/filesystem/proffer.storage.filesystem.ipublicurlprovider.md new file mode 100644 index 0000000..1c54441 --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.ipublicurlprovider.md @@ -0,0 +1,32 @@ +# IPublicUrlProvider + +Namespace: Proffer.Storage.FileSystem + +Provides a way to serve files from an HTTP URL on a File System. + +```csharp +public interface IPublicUrlProvider +``` + +## Methods + +### **GetPublicUrl(String, FileSystemFileReference)** + +Gets the public URL of a file reference. + +```csharp +string GetPublicUrl(string storeName, FileSystemFileReference file) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`file` [FileSystemFileReference](./proffer.storage.filesystem.internal.filesystemfilereference.md)
+The reference holding the file path. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The public URL. diff --git a/docs/api/storage/filesystem/proffer.storage.filesystem.noextendedpropertiesprovider.md b/docs/api/storage/filesystem/proffer.storage.filesystem.noextendedpropertiesprovider.md new file mode 100644 index 0000000..7f31152 --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystem.noextendedpropertiesprovider.md @@ -0,0 +1,69 @@ +# NoExtendedPropertiesProvider + +Namespace: Proffer.Storage.FileSystem + +Default [IExtendedPropertiesProvider](./proffer.storage.filesystem.iextendedpropertiesprovider.md) without property storage capacity. + +```csharp +public class NoExtendedPropertiesProvider : IExtendedPropertiesProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [NoExtendedPropertiesProvider](./proffer.storage.filesystem.noextendedpropertiesprovider.md)
+Implements [IExtendedPropertiesProvider](./proffer.storage.filesystem.iextendedpropertiesprovider.md) + +## Constructors + +### **NoExtendedPropertiesProvider()** + + + +```csharp +public NoExtendedPropertiesProvider() +``` + +## Methods + +### **GetExtendedPropertiesAsync(String, IPrivateFileReference)** + +Gets the extended properties of a file reference. + +```csharp +public ValueTask GetExtendedPropertiesAsync(string storeAbsolutePath, IPrivateFileReference file) +``` + +#### Parameters + +`storeAbsolutePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The store absolute path. + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<FileExtendedProperties>
+A loaded instance or a default one if not found. + +### **SaveExtendedPropertiesAsync(String, IPrivateFileReference, FileExtendedProperties)** + +Saves the extended properties for a file reference. + +```csharp +public Task SaveExtendedPropertiesAsync(string storeAbsolutePath, IPrivateFileReference file, FileExtendedProperties extendedProperties) +``` + +#### Parameters + +`storeAbsolutePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The store absolute path. + +`file` IPrivateFileReference
+The reference holding the file path. + +`extendedProperties` [FileExtendedProperties](./proffer.storage.filesystem.internal.fileextendedproperties.md)
+The extended properties. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. diff --git a/docs/api/storage/filesystem/proffer.storage.filesystemstorageservicecollectionextensions.md b/docs/api/storage/filesystem/proffer.storage.filesystemstorageservicecollectionextensions.md new file mode 100644 index 0000000..14606a9 --- /dev/null +++ b/docs/api/storage/filesystem/proffer.storage.filesystemstorageservicecollectionextensions.md @@ -0,0 +1,52 @@ +# FileSystemStorageServiceCollectionExtensions + +Namespace: Proffer.Storage + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class FileSystemStorageServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemStorageServiceCollectionExtensions](./proffer.storage.filesystemstorageservicecollectionextensions.md) + +## Methods + +### **AddFileSystemStorage(IServiceCollection, String)** + +Registers the Proffer.Storage services to the File System on the given root path. + +```csharp +public static IServiceCollection AddFileSystemStorage(IServiceCollection services, string rootPath) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +`rootPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The root path. + +#### Returns + +IServiceCollection
+The service collection. + +### **AddFileSystemStorage(IServiceCollection)** + +Registers the Proffer.Storage services to the File System on the root path System.IO.Directory.GetCurrentDirectory. + +```csharp +public static IServiceCollection AddFileSystemStorage(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/storage/filesystem/properties/json/index.md b/docs/api/storage/filesystem/properties/json/index.md new file mode 100644 index 0000000..74bdd83 --- /dev/null +++ b/docs/api/storage/filesystem/properties/json/index.md @@ -0,0 +1,13 @@ +# Proffer.Storage.FileSystem.Properties.Json + +## Proffer.Storage + +[FileSystemPropertiesJsonServiceCollectionExtensions](./proffer.storage.filesystempropertiesjsonservicecollectionextensions.md) + +## Proffer.Storage.FileSystem.Properties.Json + +[FileSystemPropertiesJsonOptions](./proffer.storage.filesystem.properties.json.filesystempropertiesjsonoptions.md) + +## Proffer.Storage.FileSystem.Properties.Json.Internal + +[ExtendedPropertiesProvider](./proffer.storage.filesystem.properties.json.internal.extendedpropertiesprovider.md) diff --git a/docs/api/storage/filesystem/properties/json/proffer.storage.filesystem.properties.json.filesystempropertiesjsonoptions.md b/docs/api/storage/filesystem/properties/json/proffer.storage.filesystem.properties.json.filesystempropertiesjsonoptions.md new file mode 100644 index 0000000..6dbc89f --- /dev/null +++ b/docs/api/storage/filesystem/properties/json/proffer.storage.filesystem.properties.json.filesystempropertiesjsonoptions.md @@ -0,0 +1,35 @@ +# FileSystemPropertiesJsonOptions + +Namespace: Proffer.Storage.FileSystem.Properties.Json + +Options for an [ExtendedPropertiesProvider](./proffer.storage.filesystem.properties.json.internal.extendedpropertiesprovider.md). + +```csharp +public class FileSystemPropertiesJsonOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemPropertiesJsonOptions](./proffer.storage.filesystem.properties.json.filesystempropertiesjsonoptions.md) + +## Properties + +### **FolderNameFormat** + +Gets or sets the folder name format. + +```csharp +public string FolderNameFormat { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **FileSystemPropertiesJsonOptions()** + + + +```csharp +public FileSystemPropertiesJsonOptions() +``` diff --git a/docs/api/storage/filesystem/properties/json/proffer.storage.filesystem.properties.json.internal.extendedpropertiesprovider.md b/docs/api/storage/filesystem/properties/json/proffer.storage.filesystem.properties.json.internal.extendedpropertiesprovider.md new file mode 100644 index 0000000..da37b76 --- /dev/null +++ b/docs/api/storage/filesystem/properties/json/proffer.storage.filesystem.properties.json.internal.extendedpropertiesprovider.md @@ -0,0 +1,76 @@ +# ExtendedPropertiesProvider + +Namespace: Proffer.Storage.FileSystem.Properties.Json.Internal + +Provides a way to store and retrieve extended file properties to match the requirements of Proffer.Storage.IFileProperties on a File System using JSON files. + +```csharp +public class ExtendedPropertiesProvider : Proffer.Storage.FileSystem.IExtendedPropertiesProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ExtendedPropertiesProvider](./proffer.storage.filesystem.properties.json.internal.extendedpropertiesprovider.md)
+Implements IExtendedPropertiesProvider + +## Constructors + +### **ExtendedPropertiesProvider(IOptions<FileSystemPropertiesJsonOptions>)** + +Initializes a new instance of the [ExtendedPropertiesProvider](./proffer.storage.filesystem.properties.json.internal.extendedpropertiesprovider.md) class. + +```csharp +public ExtendedPropertiesProvider(IOptions options) +``` + +#### Parameters + +`options` IOptions<FileSystemPropertiesJsonOptions>
+The options. + +## Methods + +### **GetExtendedPropertiesAsync(String, IPrivateFileReference)** + +Gets the extended properties of a file reference. + +```csharp +public ValueTask GetExtendedPropertiesAsync(string storeAbsolutePath, IPrivateFileReference file) +``` + +#### Parameters + +`storeAbsolutePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The store absolute path. + +`file` IPrivateFileReference
+The reference holding the file path. + +#### Returns + +ValueTask<FileExtendedProperties>
+ + A loaded instance or a default one if not found. + +### **SaveExtendedPropertiesAsync(String, IPrivateFileReference, FileExtendedProperties)** + +Saves the extended properties for a file reference. + +```csharp +public Task SaveExtendedPropertiesAsync(string storeAbsolutePath, IPrivateFileReference file, FileExtendedProperties extendedProperties) +``` + +#### Parameters + +`storeAbsolutePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The store absolute path. + +`file` IPrivateFileReference
+The reference holding the file path. + +`extendedProperties` FileExtendedProperties
+The extended properties. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. diff --git a/docs/api/storage/filesystem/properties/json/proffer.storage.filesystempropertiesjsonservicecollectionextensions.md b/docs/api/storage/filesystem/properties/json/proffer.storage.filesystempropertiesjsonservicecollectionextensions.md new file mode 100644 index 0000000..0e74fb4 --- /dev/null +++ b/docs/api/storage/filesystem/properties/json/proffer.storage.filesystempropertiesjsonservicecollectionextensions.md @@ -0,0 +1,35 @@ +# FileSystemPropertiesJsonServiceCollectionExtensions + +Namespace: Proffer.Storage + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class FileSystemPropertiesJsonServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemPropertiesJsonServiceCollectionExtensions](./proffer.storage.filesystempropertiesjsonservicecollectionextensions.md) + +## Methods + +### **AddFileSystemExtendedProperties(IServiceCollection, Action<FileSystemPropertiesJsonOptions>)** + +Registers a File System extended properties provider that stores it in JSON files. + +```csharp +public static IServiceCollection AddFileSystemExtendedProperties(IServiceCollection services, Action configure) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +`configure` [Action<FileSystemPropertiesJsonOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.action-1)
+The action to configure options. + +#### Returns + +IServiceCollection
+ + The service collection. diff --git a/docs/api/storage/filesystem/server/index.md b/docs/api/storage/filesystem/server/index.md new file mode 100644 index 0000000..8767d1f --- /dev/null +++ b/docs/api/storage/filesystem/server/index.md @@ -0,0 +1,15 @@ +# Proffer.Storage.FileSystem.Server + +## Proffer.Storage + +[ServiceCollectionExtensions](./proffer.storage.servicecollectionextensions.md) + +## Proffer.Storage.FileSystem.Server + +[FileSystemStorageServerMiddleware](./proffer.storage.filesystem.server.filesystemstorageservermiddleware.md) + +[FileSystemStorageServerOptions](./proffer.storage.filesystem.server.filesystemstorageserveroptions.md) + +## Proffer.Storage.FileSystem.Server.Internal + +[PublicUrlProvider](./proffer.storage.filesystem.server.internal.publicurlprovider.md) diff --git a/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.filesystemstorageservermiddleware.md b/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.filesystemstorageservermiddleware.md new file mode 100644 index 0000000..70f3377 --- /dev/null +++ b/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.filesystemstorageservermiddleware.md @@ -0,0 +1,54 @@ +# FileSystemStorageServerMiddleware + +Namespace: Proffer.Storage.FileSystem.Server + +ASP.NET Core middleware to serve over HTTP files stored in a Storage store. + +```csharp +public class FileSystemStorageServerMiddleware +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemStorageServerMiddleware](./proffer.storage.filesystem.server.filesystemstorageservermiddleware.md) + +## Constructors + +### **FileSystemStorageServerMiddleware(RequestDelegate, IOptions<FileSystemStorageServerOptions>, ILogger<FileSystemStorageServerMiddleware>, IOptions<FileSystemParsedOptions>)** + +Initializes a new instance of the [FileSystemStorageServerMiddleware](./proffer.storage.filesystem.server.filesystemstorageservermiddleware.md) class. + +```csharp +public FileSystemStorageServerMiddleware(RequestDelegate next, IOptions serverOptions, ILogger logger, IOptions fileSystemParsedOptions) +``` + +#### Parameters + +`next` RequestDelegate
+The next function. + +`serverOptions` IOptions<FileSystemStorageServerOptions>
+The server options. + +`logger` ILogger<FileSystemStorageServerMiddleware>
+The logger. + +`fileSystemParsedOptions` IOptions<FileSystemParsedOptions>
+The file system parsed options. + +## Methods + +### **Invoke(HttpContext)** + +Invokes the middleware. + +```csharp +public Task Invoke(HttpContext context) +``` + +#### Parameters + +`context` HttpContext
+The context. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
diff --git a/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.filesystemstorageserveroptions.md b/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.filesystemstorageserveroptions.md new file mode 100644 index 0000000..9cc3702 --- /dev/null +++ b/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.filesystemstorageserveroptions.md @@ -0,0 +1,59 @@ +# FileSystemStorageServerOptions + +Namespace: Proffer.Storage.FileSystem.Server + +Options for a [FileSystemStorageServerMiddleware](./proffer.storage.filesystem.server.filesystemstorageservermiddleware.md). + +```csharp +public class FileSystemStorageServerOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [FileSystemStorageServerOptions](./proffer.storage.filesystem.server.filesystemstorageserveroptions.md) + +## Properties + +### **BaseUri** + +Gets or sets the base URI. + +```csharp +public Uri BaseUri { get; set; } +``` + +#### Property Value + +Uri
+ +### **EndpointPath** + +Gets or sets the endpoint path. + +```csharp +public PathString EndpointPath { get; set; } +``` + +#### Property Value + +PathString
+ +### **SigningKey** + +Gets or sets the signing key. + +```csharp +public Byte[] SigningKey { get; set; } +``` + +#### Property Value + +[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+ +## Constructors + +### **FileSystemStorageServerOptions()** + + + +```csharp +public FileSystemStorageServerOptions() +``` diff --git a/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.internal.publicurlprovider.md b/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.internal.publicurlprovider.md new file mode 100644 index 0000000..13e50dd --- /dev/null +++ b/docs/api/storage/filesystem/server/proffer.storage.filesystem.server.internal.publicurlprovider.md @@ -0,0 +1,51 @@ +# PublicUrlProvider + +Namespace: Proffer.Storage.FileSystem.Server.Internal + +Provides a way to serve files from an HTTP URL on a File System using an ASP.NET middleware. + +```csharp +public class PublicUrlProvider : Proffer.Storage.FileSystem.IPublicUrlProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [PublicUrlProvider](./proffer.storage.filesystem.server.internal.publicurlprovider.md)
+Implements IPublicUrlProvider + +## Constructors + +### **PublicUrlProvider(IOptions<FileSystemStorageServerOptions>)** + +Initializes a new instance of the [PublicUrlProvider](./proffer.storage.filesystem.server.internal.publicurlprovider.md) class. + +```csharp +public PublicUrlProvider(IOptions options) +``` + +#### Parameters + +`options` IOptions<FileSystemStorageServerOptions>
+The options. + +## Methods + +### **GetPublicUrl(String, FileSystemFileReference)** + +Gets the public URL of a file reference. + +```csharp +public string GetPublicUrl(string storeName, FileSystemFileReference file) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`file` FileSystemFileReference
+The reference holding the file path. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ + The public URL. diff --git a/docs/api/storage/filesystem/server/proffer.storage.servicecollectionextensions.md b/docs/api/storage/filesystem/server/proffer.storage.servicecollectionextensions.md new file mode 100644 index 0000000..4033719 --- /dev/null +++ b/docs/api/storage/filesystem/server/proffer.storage.servicecollectionextensions.md @@ -0,0 +1,52 @@ +# ServiceCollectionExtensions + +Namespace: Proffer.Storage + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class ServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ServiceCollectionExtensions](./proffer.storage.servicecollectionextensions.md) + +## Methods + +### **AddFileSystemStorageServer(IServiceCollection, Action<FileSystemStorageServerOptions>)** + +Adds a File System provider Storage Server, serving files over HTTP. + +```csharp +public static IServiceCollection AddFileSystemStorageServer(IServiceCollection services, Action configure) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +`configure` [Action<FileSystemStorageServerOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.action-1)
+The action to configure options. + +#### Returns + +IServiceCollection
+The service collection. + +### **UseFileSystemStorageServer(IApplicationBuilder)** + +Adds a [FileSystemStorageServerMiddleware](./proffer.storage.filesystem.server.filesystemstorageservermiddleware.md) to the application's request pipeline. + +```csharp +public static IApplicationBuilder UseFileSystemStorageServer(IApplicationBuilder app) +``` + +#### Parameters + +`app` IApplicationBuilder
+The application builder. + +#### Returns + +IApplicationBuilder
+The application builder. diff --git a/docs/api/storage/index.md b/docs/api/storage/index.md new file mode 100644 index 0000000..e76a3ea --- /dev/null +++ b/docs/api/storage/index.md @@ -0,0 +1,75 @@ +# Proffer.Storage + +## Proffer.Storage + +[IFileProperties](./proffer.storage.ifileproperties.md) + +[IFileReference](./proffer.storage.ifilereference.md) + +[IPrivateFileReference](./proffer.storage.iprivatefilereference.md) + +[ISharedAccessPolicy](./proffer.storage.isharedaccesspolicy.md) + +[IStorageFactory](./proffer.storage.istoragefactory.md) + +[IStorageProvider](./proffer.storage.istorageprovider.md) + +[IStore](./proffer.storage.istore.md) + +[IStore<TOptions>](./proffer.storage.istore-1.md) + +[IStoreExtensions](./proffer.storage.istoreextensions.md) + +[OverwritePolicy](./proffer.storage.overwritepolicy.md) + +[SharedAccessPermissions](./proffer.storage.sharedaccesspermissions.md) + +[SharedAccessPolicy](./proffer.storage.sharedaccesspolicy.md) + +[StorageServiceCollectionExtensions](./proffer.storage.storageservicecollectionextensions.md) + +[StoreBase](./proffer.storage.storebase.md) + +## Proffer.Storage.Configuration + +[AccessLevel](./proffer.storage.configuration.accesslevel.md) + +[ConfigurationExtensions](./proffer.storage.configuration.configurationextensions.md) + +[IParsedOptions<TProviderOptions, TStoreOptions, TScopedStoreOptions>](./proffer.storage.configuration.iparsedoptions-3.md) + +[IScopedStoreOptions](./proffer.storage.configuration.iscopedstoreoptions.md) + +[IStoreOptions](./proffer.storage.configuration.istoreoptions.md) + +[ScopedStoreOptions](./proffer.storage.configuration.scopedstoreoptions.md) + +[StorageOptions](./proffer.storage.configuration.storageoptions.md) + +[StoreOptions](./proffer.storage.configuration.storeoptions.md) + +## Proffer.Storage.Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md) + +[BadScopedStoreConfiguration](./proffer.storage.exceptions.badscopedstoreconfiguration.md) + +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md) + +[FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md) + +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md) + +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md) + +## Proffer.Storage.Internal + +[ConfigureProviderOptions<TParsedOptions, TProviderOptions, TStoreOptions, TScopedStoreOptions>](./proffer.storage.internal.configureprovideroptions-4.md) + +[GenericStoreProxy<TOptions>](./proffer.storage.internal.genericstoreproxy-1.md) + +[PrivateFileReference](./proffer.storage.internal.privatefilereference.md) + +[StorageFactory](./proffer.storage.internal.storagefactory.md) + +[StorageProviderBase<TParsedOptions, TInstanceOptions, TStoreOptions, TScopedStoreOptions>](./proffer.storage.internal.storageproviderbase-4.md) diff --git a/docs/api/storage/proffer.storage.configuration.accesslevel.md b/docs/api/storage/proffer.storage.configuration.accesslevel.md new file mode 100644 index 0000000..d04f23a --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.accesslevel.md @@ -0,0 +1,20 @@ +# AccessLevel + +Namespace: Proffer.Storage.Configuration + +Defines a store access level. + +```csharp +public enum AccessLevel +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Enum](https://docs.microsoft.com/en-us/dotnet/api/system.enum) → [AccessLevel](./proffer.storage.configuration.accesslevel.md)
+Implements [IComparable](https://docs.microsoft.com/en-us/dotnet/api/system.icomparable), [IFormattable](https://docs.microsoft.com/en-us/dotnet/api/system.iformattable), [IConvertible](https://docs.microsoft.com/en-us/dotnet/api/system.iconvertible) + +## Fields + +| Name | Value | Description | +| --- | --: | --- | +| Private | 0 | No public access. | +| Confidential | 1 | Public files without listing. | +| Public | 2 | Public access. | diff --git a/docs/api/storage/proffer.storage.configuration.configurationextensions.md b/docs/api/storage/proffer.storage.configuration.configurationextensions.md new file mode 100644 index 0000000..ba7323c --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.configurationextensions.md @@ -0,0 +1,217 @@ +# ConfigurationExtensions + +Namespace: Proffer.Storage.Configuration + +Extensions methods to parse and bind options. + +```csharp +public static class ConfigurationExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ConfigurationExtensions](./proffer.storage.configuration.configurationextensions.md) + +## Methods + +### **Parse<TOptions>(IReadOnlyDictionary<String, IConfigurationSection>)** + +Parses the specified unparsed configuration. + +```csharp +public static IReadOnlyDictionary Parse(IReadOnlyDictionary unparsedConfiguration) +``` + +#### Type Parameters + +`TOptions`
+The type of the options. + +#### Parameters + +`unparsedConfiguration` [IReadOnlyDictionary<String, IConfigurationSection>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+The unparsed configuration. + +#### Returns + +IReadOnlyDictionary<String, TOptions>
+A typed dictionary with options binding from the given unparsed configuration. + +### **GetStoreConfiguration<TInstanceOptions, TStoreOptions, TScopedStoreOptions>(IParsedOptions<TInstanceOptions, TStoreOptions, TScopedStoreOptions>, String, Boolean)** + +Gets the store configuration. + +```csharp +public static TStoreOptions GetStoreConfiguration(IParsedOptions parsedOptions, string storeName, bool throwIfNotFound) +``` + +#### Type Parameters + +`TInstanceOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +#### Parameters + +`parsedOptions` IParsedOptions<TInstanceOptions, TStoreOptions, TScopedStoreOptions>
+The parsed options. + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`throwIfNotFound` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, throws an exception if the store configuration is not found. + +#### Returns + +TStoreOptions
+The typed store configuration. + +#### Exceptions + +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **GetScopedStoreConfiguration<TInstanceOptions, TStoreOptions, TScopedStoreOptions>(IParsedOptions<TInstanceOptions, TStoreOptions, TScopedStoreOptions>, String, Boolean)** + +Gets the scoped store configuration. + +```csharp +public static TScopedStoreOptions GetScopedStoreConfiguration(IParsedOptions parsedOptions, string storeName, bool throwIfNotFound) +``` + +#### Type Parameters + +`TInstanceOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +#### Parameters + +`parsedOptions` IParsedOptions<TInstanceOptions, TStoreOptions, TScopedStoreOptions>
+The parsed options. + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`throwIfNotFound` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, throws an exception if the store configuration is not found. + +#### Returns + +TScopedStoreOptions
+The typed scoped store configuration. + +#### Exceptions + +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **Compute<TParsedOptions, TProviderOptions, TStoreOptions, TScopedStoreOptions>(TProviderOptions, TParsedOptions)** + +Computes the specified options. + +```csharp +public static void Compute(TProviderOptions providerOptions, TParsedOptions options) +``` + +#### Type Parameters + +`TParsedOptions`
+The type of the parsed options. + +`TProviderOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +#### Parameters + +`providerOptions` TProviderOptions
+The provider options. + +`options` TParsedOptions
+The options. + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +### **Compute<TParsedOptions, TInstanceOptions, TStoreOptions, TScopedStoreOptions>(TStoreOptions, TParsedOptions)** + +Computes the specified options. + +```csharp +public static void Compute(TStoreOptions parsedStore, TParsedOptions options) +``` + +#### Type Parameters + +`TParsedOptions`
+The type of the parsed options. + +`TInstanceOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +#### Parameters + +`parsedStore` TStoreOptions
+The parsed store options. + +`options` TParsedOptions
+The options. + +#### Exceptions + +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +### **ParseStoreOptions<TParsedOptions, TInstanceOptions, TStoreOptions, TScopedStoreOptions>(IStoreOptions, TParsedOptions)** + +Parses the store options. + +```csharp +public static TStoreOptions ParseStoreOptions(IStoreOptions storeOptions, TParsedOptions options) +``` + +#### Type Parameters + +`TParsedOptions`
+The type of the parsed options. + +`TInstanceOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +#### Parameters + +`storeOptions` [IStoreOptions](./proffer.storage.configuration.istoreoptions.md)
+The store options. + +`options` TParsedOptions
+The options. + +#### Returns + +TStoreOptions
+The parsed store options. diff --git a/docs/api/storage/proffer.storage.configuration.iparsedoptions-3.md b/docs/api/storage/proffer.storage.configuration.iparsedoptions-3.md new file mode 100644 index 0000000..5547e64 --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.iparsedoptions-3.md @@ -0,0 +1,117 @@ +# IParsedOptions<TProviderOptions, TStoreOptions, TScopedStoreOptions> + +Namespace: Proffer.Storage.Configuration + +Typed options parsed from the dynamic configuration. + +```csharp +public interface IParsedOptions +``` + +#### Type Parameters + +`TProviderOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +## Properties + +### **Name** + +Gets the name. + +```csharp +public abstract string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ConnectionStrings** + +Gets or sets the connection strings. + +```csharp +public abstract IReadOnlyDictionary ConnectionStrings { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedProviders** + +Gets or sets the parsed provider options. + +```csharp +public abstract IReadOnlyDictionary ParsedProviders { get; set; } +``` + +#### Property Value + +IReadOnlyDictionary<String, TProviderOptions>
+ +### **ParsedStores** + +Gets or sets the parsed stores options. + +```csharp +public abstract IReadOnlyDictionary ParsedStores { get; set; } +``` + +#### Property Value + +IReadOnlyDictionary<String, TStoreOptions>
+ +### **ParsedScopedStores** + +Gets or sets the parsed scoped stores options. + +```csharp +public abstract IReadOnlyDictionary ParsedScopedStores { get; set; } +``` + +#### Property Value + +IReadOnlyDictionary<String, TScopedStoreOptions>
+ +## Methods + +### **BindProviderOptions(TProviderOptions)** + +Binds the provider options. + +```csharp +void BindProviderOptions(TProviderOptions providerOptions) +``` + +#### Parameters + +`providerOptions` TProviderOptions
+The provider options. + +### **BindStoreOptions(TStoreOptions, TProviderOptions)** + +Binds the store options. + +```csharp +void BindStoreOptions(TStoreOptions storeOptions, TProviderOptions providerInstanceOptions) +``` + +#### Parameters + +`storeOptions` TStoreOptions
+The store options. + +`providerInstanceOptions` TProviderOptions
+The provider instance options. + +#### Exceptions + +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
diff --git a/docs/api/storage/proffer.storage.configuration.iscopedstoreoptions.md b/docs/api/storage/proffer.storage.configuration.iscopedstoreoptions.md new file mode 100644 index 0000000..35026cf --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.iscopedstoreoptions.md @@ -0,0 +1,25 @@ +# IScopedStoreOptions + +Namespace: Proffer.Storage.Configuration + +Options for a scoped [IStore](./proffer.storage.istore.md). + +```csharp +public interface IScopedStoreOptions : IStoreOptions, Proffer.Configuration.INamedElementOptions +``` + +Implements [IStoreOptions](./proffer.storage.configuration.istoreoptions.md), INamedElementOptions + +## Properties + +### **FolderNameFormat** + +Gets the folder name format. + +```csharp +public abstract string FolderNameFormat { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/storage/proffer.storage.configuration.istoreoptions.md b/docs/api/storage/proffer.storage.configuration.istoreoptions.md new file mode 100644 index 0000000..e699c3d --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.istoreoptions.md @@ -0,0 +1,85 @@ +# IStoreOptions + +Namespace: Proffer.Storage.Configuration + +Options for an [IStore](./proffer.storage.istore.md). + +```csharp +public interface IStoreOptions : Proffer.Configuration.INamedElementOptions +``` + +Implements INamedElementOptions + +## Properties + +### **ProviderName** + +Gets or sets the name of the provider. + +```csharp +public abstract string ProviderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderType** + +Gets or sets the type of the provider. + +```csharp +public abstract string ProviderType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AccessLevel** + +Gets or sets the access level. + +```csharp +public abstract AccessLevel AccessLevel { get; set; } +``` + +#### Property Value + +[AccessLevel](./proffer.storage.configuration.accesslevel.md)
+ +### **FolderName** + +Gets or sets the name of the folder. + +```csharp +public abstract string FolderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Methods + +### **Validate(Boolean)** + +Validates the options. + +```csharp +IEnumerable Validate(bool throwOnError) +``` + +#### Parameters + +`throwOnError` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, throws an exception when the validation fails with any . + +#### Returns + +[IEnumerable<IOptionError>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The returned by the validation, if any. + +#### Exceptions + +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
diff --git a/docs/api/storage/proffer.storage.configuration.scopedstoreoptions.md b/docs/api/storage/proffer.storage.configuration.scopedstoreoptions.md new file mode 100644 index 0000000..f3b11fd --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.scopedstoreoptions.md @@ -0,0 +1,96 @@ +# ScopedStoreOptions + +Namespace: Proffer.Storage.Configuration + +Generic options for a scoped [IStore](./proffer.storage.istore.md). + +```csharp +public class ScopedStoreOptions : StoreOptions, IStoreOptions, Proffer.Configuration.INamedElementOptions, IScopedStoreOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StoreOptions](./proffer.storage.configuration.storeoptions.md) → [ScopedStoreOptions](./proffer.storage.configuration.scopedstoreoptions.md)
+Implements [IStoreOptions](./proffer.storage.configuration.istoreoptions.md), INamedElementOptions, [IScopedStoreOptions](./proffer.storage.configuration.iscopedstoreoptions.md) + +## Properties + +### **FolderNameFormat** + +Gets the folder name format. + +```csharp +public string FolderNameFormat { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Name** + +Gets or sets the name. + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderName** + +Gets or sets the name of the provider. + +```csharp +public string ProviderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderType** + +Gets or sets the type of the provider. + +```csharp +public string ProviderType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AccessLevel** + +Gets or sets the access level. + +```csharp +public AccessLevel AccessLevel { get; set; } +``` + +#### Property Value + +[AccessLevel](./proffer.storage.configuration.accesslevel.md)
+ +### **FolderName** + +Gets or sets the name of the folder. + +```csharp +public string FolderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **ScopedStoreOptions()** + + + +```csharp +public ScopedStoreOptions() +``` diff --git a/docs/api/storage/proffer.storage.configuration.storageoptions.md b/docs/api/storage/proffer.storage.configuration.storageoptions.md new file mode 100644 index 0000000..2f7a85b --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.storageoptions.md @@ -0,0 +1,161 @@ +# StorageOptions + +Namespace: Proffer.Storage.Configuration + +The Proffer.Storage options with providers and stores. + +```csharp +public class StorageOptions : IParsedOptions`3 +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StorageOptions](./proffer.storage.configuration.storageoptions.md)
+Implements [IParsedOptions<ProviderOptions, StoreOptions, ScopedStoreOptions>](./proffer.storage.configuration.iparsedoptions-3.md) + +## Fields + +### **DefaultConfigurationSectionName** + +The default configuration section name. + +```csharp +public static string DefaultConfigurationSectionName; +``` + +## Properties + +### **Name** + +Gets the name. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Providers** + +Gets or sets the providers unparsed options. + +```csharp +public IReadOnlyDictionary Providers { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, IConfigurationSection>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **Stores** + +Gets or sets the stores unparsed options. + +```csharp +public IReadOnlyDictionary Stores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, IConfigurationSection>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ScopedStores** + +Gets or sets the scoped stores unparsed options. + +```csharp +public IReadOnlyDictionary ScopedStores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, IConfigurationSection>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ConnectionStrings** + +Gets or sets the connection strings. + +```csharp +public IReadOnlyDictionary ConnectionStrings { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedProviders** + +Gets or sets the parsed provider instances options. + +```csharp +public IReadOnlyDictionary ParsedProviders { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, ProviderOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedStores** + +Gets or sets the parsed stores options. + +```csharp +public IReadOnlyDictionary ParsedStores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, StoreOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +### **ParsedScopedStores** + +Gets or sets the parsed scoped stores options. + +```csharp +public IReadOnlyDictionary ParsedScopedStores { get; set; } +``` + +#### Property Value + +[IReadOnlyDictionary<String, ScopedStoreOptions>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlydictionary-2)
+ +## Constructors + +### **StorageOptions()** + +Initializes a new instance of the [StorageOptions](./proffer.storage.configuration.storageoptions.md) class. + +```csharp +public StorageOptions() +``` + +## Methods + +### **BindProviderOptions(ProviderOptions)** + +Binds the provider instance options. + +```csharp +public void BindProviderOptions(ProviderOptions providerInstanceOptions) +``` + +#### Parameters + +`providerInstanceOptions` ProviderOptions
+The provider instance options. + +### **BindStoreOptions(StoreOptions, ProviderOptions)** + +Binds the store options. + +```csharp +public void BindStoreOptions(StoreOptions storeOptions, ProviderOptions providerInstanceOptions) +``` + +#### Parameters + +`storeOptions` [StoreOptions](./proffer.storage.configuration.storeoptions.md)
+The store options. + +`providerInstanceOptions` ProviderOptions
+The provider instance options. diff --git a/docs/api/storage/proffer.storage.configuration.storeoptions.md b/docs/api/storage/proffer.storage.configuration.storeoptions.md new file mode 100644 index 0000000..fd70a2c --- /dev/null +++ b/docs/api/storage/proffer.storage.configuration.storeoptions.md @@ -0,0 +1,125 @@ +# StoreOptions + +Namespace: Proffer.Storage.Configuration + +Generic options for an [IStore](./proffer.storage.istore.md). + +```csharp +public class StoreOptions : IStoreOptions, Proffer.Configuration.INamedElementOptions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StoreOptions](./proffer.storage.configuration.storeoptions.md)
+Implements [IStoreOptions](./proffer.storage.configuration.istoreoptions.md), INamedElementOptions + +## Properties + +### **Name** + +Gets or sets the name. + +```csharp +public string Name { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderName** + +Gets or sets the name of the provider. + +```csharp +public string ProviderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ProviderType** + +Gets or sets the type of the provider. + +```csharp +public string ProviderType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **AccessLevel** + +Gets or sets the access level. + +```csharp +public AccessLevel AccessLevel { get; set; } +``` + +#### Property Value + +[AccessLevel](./proffer.storage.configuration.accesslevel.md)
+ +### **FolderName** + +Gets or sets the name of the folder. + +```csharp +public string FolderName { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **StoreOptions()** + + + +```csharp +public StoreOptions() +``` + +## Methods + +### **Validate(Boolean)** + +Validates the options. + +```csharp +public IEnumerable Validate(bool throwOnError) +``` + +#### Parameters + +`throwOnError` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, throws an exception when the validation fails with any . + +#### Returns + +[IEnumerable<IOptionError>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ + The returned by the validation, if any. + +#### Exceptions + +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +### **PushMissingPropertyError(List<OptionError>, String)** + +Pushes a missing property Proffer.Configuration.IOptionError to the list or errors. + +```csharp +protected void PushMissingPropertyError(List optionErrors, string propertyName) +``` + +#### Parameters + +`optionErrors` [List<OptionError>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1)
+The option errors. + +`propertyName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the missing property. diff --git a/docs/api/storage/proffer.storage.exceptions.badproviderconfiguration.md b/docs/api/storage/proffer.storage.exceptions.badproviderconfiguration.md new file mode 100644 index 0000000..d2131a9 --- /dev/null +++ b/docs/api/storage/proffer.storage.exceptions.badproviderconfiguration.md @@ -0,0 +1,128 @@ +# BadProviderConfiguration + +Namespace: Proffer.Storage.Exceptions + +Thrown when a provider was not properly configured. + +```csharp +public class BadProviderConfiguration : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **BadProviderConfiguration(String, String)** + +Initializes a new instance of the [BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md) class. + +```csharp +public BadProviderConfiguration(string providerName, string details) +``` + +#### Parameters + +`providerName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the provider. + +`details` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The details. diff --git a/docs/api/storage/proffer.storage.exceptions.badscopedstoreconfiguration.md b/docs/api/storage/proffer.storage.exceptions.badscopedstoreconfiguration.md new file mode 100644 index 0000000..94b675c --- /dev/null +++ b/docs/api/storage/proffer.storage.exceptions.badscopedstoreconfiguration.md @@ -0,0 +1,131 @@ +# BadScopedStoreConfiguration + +Namespace: Proffer.Storage.Exceptions + +Thrown when a scoped store was not properly configured. + +```csharp +public class BadScopedStoreConfiguration : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [BadScopedStoreConfiguration](./proffer.storage.exceptions.badscopedstoreconfiguration.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **BadScopedStoreConfiguration(String, String, Exception)** + +Initializes a new instance of the [BadScopedStoreConfiguration](./proffer.storage.exceptions.badscopedstoreconfiguration.md) class. + +```csharp +public BadScopedStoreConfiguration(string storeName, string details, Exception innerException) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`details` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The details. + +`innerException` [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+The inner exception. diff --git a/docs/api/storage/proffer.storage.exceptions.badstoreconfiguration.md b/docs/api/storage/proffer.storage.exceptions.badstoreconfiguration.md new file mode 100644 index 0000000..bbfd57b --- /dev/null +++ b/docs/api/storage/proffer.storage.exceptions.badstoreconfiguration.md @@ -0,0 +1,156 @@ +# BadStoreConfiguration + +Namespace: Proffer.Storage.Exceptions + +Thrown when a store was not properly configured. + +```csharp +public class BadStoreConfiguration : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **Errors** + +Gets the validation errors. + +```csharp +public IEnumerable Errors { get; } +``` + +#### Property Value + +[IEnumerable<IOptionError>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+ +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **BadStoreConfiguration(String, String)** + +Initializes a new instance of the [BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md) class. + +```csharp +public BadStoreConfiguration(string storeName, string details) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`details` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The details. + +### **BadStoreConfiguration(String, IEnumerable<IOptionError>)** + +Initializes a new instance of the [BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md) class. + +```csharp +public BadStoreConfiguration(string storeName, IEnumerable errors) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`errors` [IEnumerable<IOptionError>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The errors. diff --git a/docs/api/storage/proffer.storage.exceptions.filealreadyexistsexception.md b/docs/api/storage/proffer.storage.exceptions.filealreadyexistsexception.md new file mode 100644 index 0000000..a228670 --- /dev/null +++ b/docs/api/storage/proffer.storage.exceptions.filealreadyexistsexception.md @@ -0,0 +1,128 @@ +# FileAlreadyExistsException + +Namespace: Proffer.Storage.Exceptions + +Thrown when trying to create a file that already exists in a store. + +```csharp +public class FileAlreadyExistsException : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **FileAlreadyExistsException(String, String)** + +Initializes a new instance of the [FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md) class. + +```csharp +public FileAlreadyExistsException(string storeName, string filePath) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`filePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. diff --git a/docs/api/storage/proffer.storage.exceptions.providernotfoundexception.md b/docs/api/storage/proffer.storage.exceptions.providernotfoundexception.md new file mode 100644 index 0000000..91b7c05 --- /dev/null +++ b/docs/api/storage/proffer.storage.exceptions.providernotfoundexception.md @@ -0,0 +1,125 @@ +# ProviderNotFoundException + +Namespace: Proffer.Storage.Exceptions + +Thrown when a configured provider cannot be resolved through dependency injection. + +```csharp +public class ProviderNotFoundException : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **ProviderNotFoundException(String)** + +Initializes a new instance of the [ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md) class. + +```csharp +public ProviderNotFoundException(string providerName) +``` + +#### Parameters + +`providerName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the provider. diff --git a/docs/api/storage/proffer.storage.exceptions.storenotfoundexception.md b/docs/api/storage/proffer.storage.exceptions.storenotfoundexception.md new file mode 100644 index 0000000..5313235 --- /dev/null +++ b/docs/api/storage/proffer.storage.exceptions.storenotfoundexception.md @@ -0,0 +1,125 @@ +# StoreNotFoundException + +Namespace: Proffer.Storage.Exceptions + +Thrown when a store was not found in the configuration. + +```csharp +public class StoreNotFoundException : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **StoreNotFoundException(String)** + +Initializes a new instance of the [StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md) class. + +```csharp +public StoreNotFoundException(string storeName) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. diff --git a/docs/api/storage/proffer.storage.ifileproperties.md b/docs/api/storage/proffer.storage.ifileproperties.md new file mode 100644 index 0000000..7bfadcb --- /dev/null +++ b/docs/api/storage/proffer.storage.ifileproperties.md @@ -0,0 +1,95 @@ +# IFileProperties + +Namespace: Proffer.Storage + +File common properties with metadata. + +```csharp +public interface IFileProperties +``` + +## Properties + +### **LastModified** + +Gets the last modified time. + +```csharp +public abstract Nullable LastModified { get; } +``` + +#### Property Value + +[Nullable<DateTimeOffset>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+ +### **Length** + +Gets the length of the content. + +```csharp +public abstract long Length { get; } +``` + +#### Property Value + +[Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64)
+ +### **ContentType** + +Gets or sets the content-type. + +```csharp +public abstract string ContentType { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ETag** + +Gets the etag. + +```csharp +public abstract string ETag { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **CacheControl** + +Gets or sets the cache control. + +```csharp +public abstract string CacheControl { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **ContentMD5** + +Gets the MD5 digest of the content. + +```csharp +public abstract string ContentMD5 { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Metadata** + +Gets the metadata. + +```csharp +public abstract IDictionary Metadata { get; } +``` + +#### Property Value + +[IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
diff --git a/docs/api/storage/proffer.storage.ifilereference.md b/docs/api/storage/proffer.storage.ifilereference.md new file mode 100644 index 0000000..791d3dc --- /dev/null +++ b/docs/api/storage/proffer.storage.ifilereference.md @@ -0,0 +1,171 @@ +# IFileReference + +Namespace: Proffer.Storage + +A reference of a stored file at a given path. + +```csharp +public interface IFileReference : IPrivateFileReference +``` + +Implements [IPrivateFileReference](./proffer.storage.iprivatefilereference.md) + +## Properties + +### **PublicUrl** + +Gets the public URL. + +```csharp +public abstract string PublicUrl { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Properties** + +Gets the properties. + +```csharp +public abstract IFileProperties Properties { get; } +``` + +#### Property Value + +[IFileProperties](./proffer.storage.ifileproperties.md)
+ +## Methods + +### **ReadToStreamAsync(Stream)** + +Reads the file content into the given stream. + +```csharp +Task ReadToStreamAsync(Stream targetStream) +``` + +#### Parameters + +`targetStream` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The target stream. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. + +### **ReadAsync()** + +Reads the file content. + +```csharp +ValueTask ReadAsync() +``` + +#### Returns + +ValueTask<Stream>
+A containing the file content. + +### **ReadAllTextAsync()** + +Reads the file content. + +```csharp +ValueTask ReadAllTextAsync() +``` + +#### Returns + +ValueTask<String>
+A containing the file content. + +### **ReadAllBytesAsync()** + +Reads the file content. + +```csharp +ValueTask ReadAllBytesAsync() +``` + +#### Returns + +ValueTask<Byte[]>
+A containing the file content. + +### **DeleteAsync()** + +Deletes the file. + +```csharp +Task DeleteAsync() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. + +### **UpdateAsync(Stream)** + +Updates the file content with the given [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream). + +```csharp +Task UpdateAsync(Stream stream) +``` + +#### Parameters + +`stream` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The new file content. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. + +### **SavePropertiesAsync()** + +Saves the file properties. + +```csharp +Task SavePropertiesAsync() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. + +### **GetSharedAccessSignature(ISharedAccessPolicy)** + +Gets a shared access signature. + +```csharp +ValueTask GetSharedAccessSignature(ISharedAccessPolicy policy) +``` + +#### Parameters + +`policy` [ISharedAccessPolicy](./proffer.storage.isharedaccesspolicy.md)
+The policy. + +#### Returns + +ValueTask<String>
+A shared access signature to read file. + +### **FetchProperties()** + +Fetches the file properties. + +```csharp +Task FetchProperties() +``` + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. diff --git a/docs/api/storage/proffer.storage.internal.configureprovideroptions-4.md b/docs/api/storage/proffer.storage.internal.configureprovideroptions-4.md new file mode 100644 index 0000000..ddec75d --- /dev/null +++ b/docs/api/storage/proffer.storage.internal.configureprovideroptions-4.md @@ -0,0 +1,62 @@ +# ConfigureProviderOptions<TParsedOptions, TProviderOptions, TStoreOptions, TScopedStoreOptions> + +Namespace: Proffer.Storage.Internal + +Configures a provider from generic [StorageOptions](./proffer.storage.configuration.storageoptions.md). + +```csharp +public class ConfigureProviderOptions : +``` + +#### Type Parameters + +`TParsedOptions`
+The type of the parsed options. + +`TProviderOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ConfigureProviderOptions<TParsedOptions, TProviderOptions, TStoreOptions, TScopedStoreOptions>](./proffer.storage.internal.configureprovideroptions-4.md)
+Implements IConfigureOptions<TParsedOptions> + +## Constructors + +### **ConfigureProviderOptions(IOptions<StorageOptions>)** + +Initializes a new instance of the [ConfigureProviderOptions<TParsedOptions, TProviderOptions, TStoreOptions, TScopedStoreOptions>](./proffer.storage.internal.configureprovideroptions-4.md) class. + +```csharp +public ConfigureProviderOptions(IOptions storageOptions) +``` + +#### Parameters + +`storageOptions` IOptions<StorageOptions>
+The storage options. + +## Methods + +### **Configure(TParsedOptions)** + +Invoked to configure a instance. + +```csharp +public void Configure(TParsedOptions options) +``` + +#### Parameters + +`options` TParsedOptions
+The options instance to configure. + +#### Exceptions + +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
diff --git a/docs/api/storage/proffer.storage.internal.genericstoreproxy-1.md b/docs/api/storage/proffer.storage.internal.genericstoreproxy-1.md new file mode 100644 index 0000000..f056469 --- /dev/null +++ b/docs/api/storage/proffer.storage.internal.genericstoreproxy-1.md @@ -0,0 +1,343 @@ +# GenericStoreProxy<TOptions> + +Namespace: Proffer.Storage.Internal + +Generic [IStore](./proffer.storage.istore.md) proxy to allow direct dependency injection of a [IStore<TOptions>](./proffer.storage.istore-1.md). + +```csharp +public class GenericStoreProxy : Proffer.Storage.IStore, +``` + +#### Type Parameters + +`TOptions`
+The type of the store options. + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [GenericStoreProxy<TOptions>](./proffer.storage.internal.genericstoreproxy-1.md)
+Implements [IStore](./proffer.storage.istore.md), IStore<TOptions> + +## Properties + +### **Name** + +Gets the name of the store. + +```csharp +public string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **GenericStoreProxy(IStorageFactory, IOptions<TOptions>)** + +Initializes a new instance of the [GenericStoreProxy<TOptions>](./proffer.storage.internal.genericstoreproxy-1.md) class. + +```csharp +public GenericStoreProxy(IStorageFactory factory, IOptions options) +``` + +#### Parameters + +`factory` [IStorageFactory](./proffer.storage.istoragefactory.md)
+The storage factory. + +`options` IOptions<TOptions>
+The options. + +#### Exceptions + +[ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception)
+ +## Methods + +### **InitAsync(CancellationToken)** + +Initializes the store by creating a container in its [IStorageProvider](./proffer.storage.istorageprovider.md). + +```csharp +public Task InitAsync(CancellationToken cancellationToken) +``` + +#### Parameters + +`cancellationToken` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
+ +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **DeleteAsync(IPrivateFileReference)** + +Deletes the file. + +```csharp +public Task DeleteAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **GetAsync(Uri, Boolean)** + +Gets the file reference from URI. + +```csharp +public ValueTask GetAsync(Uri file, bool withMetadata) +``` + +#### Parameters + +`file` Uri
+The file uniform resource identifier (URI). + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+ + The at path. + +#### Exceptions + +[InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception)
+ +### **GetAsync(IPrivateFileReference, Boolean)** + +Gets the file reference from path. + +```csharp +public ValueTask GetAsync(IPrivateFileReference file, bool withMetadata) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+ + The at path. + +### **ListAsync(String, Boolean, Boolean)** + +Lists the files under . + +```csharp +public ValueTask ListAsync(string path, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under . + +### **ListAsync(String, String, Boolean, Boolean)** + +Lists the files under matching the . + +```csharp +public ValueTask ListAsync(string path, string searchPattern, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`searchPattern` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The search pattern. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under matching the . + +### **ReadAllBytesAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAllBytesAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +ValueTask<Byte[]>
+ + A containing the file content. + +### **ReadAllTextAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAllTextAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +ValueTask<String>
+ + A containing the file content. + +### **ReadAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +public ValueTask ReadAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +ValueTask<Stream>
+ + A containing the file content. + +### **SaveAsync(Stream, IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public ValueTask SaveAsync(Stream data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The file content. + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` [OverwritePolicy](./proffer.storage.overwritepolicy.md)
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +#### Exceptions + +[FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md)
+ +### **SaveAsync(Byte[], IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public ValueTask SaveAsync(Byte[] data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The file content. + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` [OverwritePolicy](./proffer.storage.overwritepolicy.md)
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +#### Exceptions + +[FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md)
+ +### **GetSharedAccessSignatureAsync(ISharedAccessPolicy)** + +Gets a shared access signature. + +```csharp +public ValueTask GetSharedAccessSignatureAsync(ISharedAccessPolicy policy) +``` + +#### Parameters + +`policy` [ISharedAccessPolicy](./proffer.storage.isharedaccesspolicy.md)
+The policy. + +#### Returns + +ValueTask<String>
+ + A shared access signature to read or list the store files. + +#### Exceptions + +[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception)
diff --git a/docs/api/storage/proffer.storage.internal.privatefilereference.md b/docs/api/storage/proffer.storage.internal.privatefilereference.md new file mode 100644 index 0000000..94153b4 --- /dev/null +++ b/docs/api/storage/proffer.storage.internal.privatefilereference.md @@ -0,0 +1,41 @@ +# PrivateFileReference + +Namespace: Proffer.Storage.Internal + +A simple reference of a stored file at a given path. + +```csharp +public class PrivateFileReference : Proffer.Storage.IPrivateFileReference +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [PrivateFileReference](./proffer.storage.internal.privatefilereference.md)
+Implements [IPrivateFileReference](./proffer.storage.iprivatefilereference.md) + +## Properties + +### **Path** + +Gets the file path. + +```csharp +public string Path { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **PrivateFileReference(String)** + +Initializes a new instance of the [PrivateFileReference](./proffer.storage.internal.privatefilereference.md) class. + +```csharp +public PrivateFileReference(string path) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. diff --git a/docs/api/storage/proffer.storage.internal.storagefactory.md b/docs/api/storage/proffer.storage.internal.storagefactory.md new file mode 100644 index 0000000..b14cede --- /dev/null +++ b/docs/api/storage/proffer.storage.internal.storagefactory.md @@ -0,0 +1,192 @@ +# StorageFactory + +Namespace: Proffer.Storage.Internal + +Default storage factory to build [IStore](./proffer.storage.istore.md) from configured [IStorageProvider](./proffer.storage.istorageprovider.md). + +```csharp +public class StorageFactory : Proffer.Storage.IStorageFactory +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StorageFactory](./proffer.storage.internal.storagefactory.md)
+Implements [IStorageFactory](./proffer.storage.istoragefactory.md) + +## Constructors + +### **StorageFactory(IEnumerable<IStorageProvider>, IOptions<StorageOptions>)** + +Initializes a new instance of the [StorageFactory](./proffer.storage.internal.storagefactory.md) class. + +```csharp +public StorageFactory(IEnumerable storageProviders, IOptions options) +``` + +#### Parameters + +`storageProviders` [IEnumerable<IStorageProvider>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The storage providers. + +`options` IOptions<StorageOptions>
+The options. + +## Methods + +### **GetStore(String, IStoreOptions)** + +Gets a store with specific options. + +```csharp +public IStore GetStore(string storeName, IStoreOptions configuration) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`configuration` [IStoreOptions](./proffer.storage.configuration.istoreoptions.md)
+The store options. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **GetStore(String)** + +Gets a store from configured options. + +```csharp +public IStore GetStore(string storeName) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **GetScopedStore(String, Object[])** + +Gets a scoped store from configured options. + +```csharp +public IStore GetScopedStore(string storeName, Object[] args) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the scoped store. + +`args` [Object[]](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The arguments to apply to the scoped store name format. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +[BadScopedStoreConfiguration](./proffer.storage.exceptions.badscopedstoreconfiguration.md)
+ +### **TryGetStore(String, IStore&)** + +Gets a store from configured options. + +```csharp +public bool TryGetStore(string storeName, IStore& store) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`store` [IStore&](./proffer.storage.istore&.md)
+When this method returns, contains the store associated with the specified name, if it is found in the ; otherwise, null. This parameter is passed uninitialized. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+true if the store was configured and built from its provider; otherwise, false. + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **TryGetStore(String, IStore&, String)** + +Gets a store from configured options. + +```csharp +public bool TryGetStore(string storeName, IStore& store, string providerName) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`store` [IStore&](./proffer.storage.istore&.md)
+When this method returns, contains the store associated with the specified name, if it is found in the ; otherwise, null. This parameter is passed uninitialized. + +`providerName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The explicit provider name from which the store should be built. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+true if the store was configured and built from its provider; otherwise, false. + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
diff --git a/docs/api/storage/proffer.storage.internal.storageproviderbase-4.md b/docs/api/storage/proffer.storage.internal.storageproviderbase-4.md new file mode 100644 index 0000000..29d748e --- /dev/null +++ b/docs/api/storage/proffer.storage.internal.storageproviderbase-4.md @@ -0,0 +1,152 @@ +# StorageProviderBase<TParsedOptions, TInstanceOptions, TStoreOptions, TScopedStoreOptions> + +Namespace: Proffer.Storage.Internal + +A base provider to handle and build file stores pointing on a particular storage system location. + +```csharp +public abstract class StorageProviderBase : Proffer.Storage.IStorageProvider +``` + +#### Type Parameters + +`TParsedOptions`
+The type of the parsed options. + +`TInstanceOptions`
+The type of the provider instance options. + +`TStoreOptions`
+The type of the store options. + +`TScopedStoreOptions`
+The type of the scoped store options. + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StorageProviderBase<TParsedOptions, TInstanceOptions, TStoreOptions, TScopedStoreOptions>](./proffer.storage.internal.storageproviderbase-4.md)
+Implements [IStorageProvider](./proffer.storage.istorageprovider.md) + +## Properties + +### **Name** + +Gets the name of this provider. + +```csharp +public abstract string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Constructors + +### **StorageProviderBase(IOptions<TParsedOptions>)** + +Initializes a new instance of the [StorageProviderBase<TParsedOptions, TInstanceOptions, TStoreOptions, TScopedStoreOptions>](./proffer.storage.internal.storageproviderbase-4.md) class. + +```csharp +public StorageProviderBase(IOptions options) +``` + +#### Parameters + +`options` IOptions<TParsedOptions>
+The options. + +## Methods + +### **BuildStore(String)** + +Builds a store from configured options. + +```csharp +public IStore BuildStore(string storeName) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **BuildStore(String, IStoreOptions)** + +Builds a store with specific options. + +```csharp +public IStore BuildStore(string storeName, IStoreOptions storeOptions) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`storeOptions` [IStoreOptions](./proffer.storage.configuration.istoreoptions.md)
+The store options. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +### **BuildScopedStore(String, Object[])** + +Builds a scoped store from configured options. + +```csharp +public IStore BuildScopedStore(string storeName, Object[] args) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`args` [Object[]](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The arguments to apply to the scoped store name format. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +[BadScopedStoreConfiguration](./proffer.storage.exceptions.badscopedstoreconfiguration.md)
+ +### **BuildStoreInternal(String, TStoreOptions)** + +Provider-specific build of a store with specific options. + +```csharp +protected abstract IStore BuildStoreInternal(string storeName, TStoreOptions storeOptions) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`storeOptions` TStoreOptions
+The store options. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . diff --git a/docs/api/storage/proffer.storage.iprivatefilereference.md b/docs/api/storage/proffer.storage.iprivatefilereference.md new file mode 100644 index 0000000..a82c61e --- /dev/null +++ b/docs/api/storage/proffer.storage.iprivatefilereference.md @@ -0,0 +1,23 @@ +# IPrivateFileReference + +Namespace: Proffer.Storage + +A reference of a stored file at a given path. + +```csharp +public interface IPrivateFileReference +``` + +## Properties + +### **Path** + +Gets the file path. + +```csharp +public abstract string Path { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/api/storage/proffer.storage.isharedaccesspolicy.md b/docs/api/storage/proffer.storage.isharedaccesspolicy.md new file mode 100644 index 0000000..0936049 --- /dev/null +++ b/docs/api/storage/proffer.storage.isharedaccesspolicy.md @@ -0,0 +1,47 @@ +# ISharedAccessPolicy + +Namespace: Proffer.Storage + +Represents a shared access policy, which specifies the start time, expiry time, and permissions for a shared access signature. + +```csharp +public interface ISharedAccessPolicy +``` + +## Properties + +### **StartTime** + +Gets the start time. + +```csharp +public abstract Nullable StartTime { get; } +``` + +#### Property Value + +[Nullable<DateTimeOffset>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+ +### **ExpiryTime** + +Gets the expiry time. + +```csharp +public abstract Nullable ExpiryTime { get; } +``` + +#### Property Value + +[Nullable<DateTimeOffset>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+ +### **Permissions** + +Gets the permissions. + +```csharp +public abstract SharedAccessPermissions Permissions { get; } +``` + +#### Property Value + +[SharedAccessPermissions](./proffer.storage.sharedaccesspermissions.md)
diff --git a/docs/api/storage/proffer.storage.istoragefactory.md b/docs/api/storage/proffer.storage.istoragefactory.md new file mode 100644 index 0000000..c505f61 --- /dev/null +++ b/docs/api/storage/proffer.storage.istoragefactory.md @@ -0,0 +1,171 @@ +# IStorageFactory + +Namespace: Proffer.Storage + +Builds [IStore](./proffer.storage.istore.md) from configured [IStorageProvider](./proffer.storage.istorageprovider.md). + +```csharp +public interface IStorageFactory +``` + +## Methods + +### **GetStore(String, IStoreOptions)** + +Gets a store with specific options. + +```csharp +IStore GetStore(string storeName, IStoreOptions configuration) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`configuration` [IStoreOptions](./proffer.storage.configuration.istoreoptions.md)
+The store options. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **GetStore(String)** + +Gets a store from configured options. + +```csharp +IStore GetStore(string storeName) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **GetScopedStore(String, Object[])** + +Gets a scoped store from configured options. + +```csharp +IStore GetScopedStore(string storeName, Object[] args) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the scoped store. + +`args` [Object[]](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The arguments to apply to the scoped store name format. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +[BadScopedStoreConfiguration](./proffer.storage.exceptions.badscopedstoreconfiguration.md)
+ +### **TryGetStore(String, IStore&)** + +Gets a store from configured options. + +```csharp +bool TryGetStore(string storeName, IStore& store) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`store` [IStore&](./proffer.storage.istore&.md)
+When this method returns, contains the store associated with the specified name, if it is found in the ; otherwise, null. This parameter is passed uninitialized. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+true if the store was configured and built from its provider; otherwise, false. + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **TryGetStore(String, IStore&, String)** + +Gets a store from configured options. + +```csharp +bool TryGetStore(string storeName, IStore& store, string providerName) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`store` [IStore&](./proffer.storage.istore&.md)
+When this method returns, contains the store associated with the specified name, if it is found in the ; otherwise, null. This parameter is passed uninitialized. + +`providerName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The explicit provider name from which the store should be built. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+true if the store was configured and built from its provider; otherwise, false. + +#### Exceptions + +[BadProviderConfiguration](./proffer.storage.exceptions.badproviderconfiguration.md)
+ +[BadStoreConfiguration](./proffer.storage.exceptions.badstoreconfiguration.md)
+ +[ProviderNotFoundException](./proffer.storage.exceptions.providernotfoundexception.md)
+ +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
diff --git a/docs/api/storage/proffer.storage.istorageprovider.md b/docs/api/storage/proffer.storage.istorageprovider.md new file mode 100644 index 0000000..830c46a --- /dev/null +++ b/docs/api/storage/proffer.storage.istorageprovider.md @@ -0,0 +1,98 @@ +# IStorageProvider + +Namespace: Proffer.Storage + +A provider handles and builds file stores pointing on a particular storage system location. + +```csharp +public interface IStorageProvider +``` + +## Properties + +### **Name** + +Gets the name of this provider. + +```csharp +public abstract string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Methods + +### **BuildStore(String)** + +Builds a store from configured options. + +```csharp +IStore BuildStore(string storeName) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +### **BuildStore(String, IStoreOptions)** + +Builds a store with specific options. + +```csharp +IStore BuildStore(string storeName, IStoreOptions storeOptions) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`storeOptions` [IStoreOptions](./proffer.storage.configuration.istoreoptions.md)
+The store options. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +### **BuildScopedStore(String, Object[])** + +Builds a scoped store from configured options. + +```csharp +IStore BuildScopedStore(string storeName, Object[] args) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`args` [Object[]](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The arguments to apply to the scoped store name format. + +#### Returns + +[IStore](./proffer.storage.istore.md)
+ + A configured . + +#### Exceptions + +[StoreNotFoundException](./proffer.storage.exceptions.storenotfoundexception.md)
+ +[BadScopedStoreConfiguration](./proffer.storage.exceptions.badscopedstoreconfiguration.md)
diff --git a/docs/api/storage/proffer.storage.istore-1.md b/docs/api/storage/proffer.storage.istore-1.md new file mode 100644 index 0000000..74a0d2a --- /dev/null +++ b/docs/api/storage/proffer.storage.istore-1.md @@ -0,0 +1,16 @@ +# IStore<TOptions> + +Namespace: Proffer.Storage + +Injectable typed store, which allows to save, list or read files on a container in its configured [IStorageProvider](./proffer.storage.istorageprovider.md). + +```csharp +public interface IStore : IStore +``` + +#### Type Parameters + +`TOptions`
+The type of the store options. + +Implements [IStore](./proffer.storage.istore.md) diff --git a/docs/api/storage/proffer.storage.istore.md b/docs/api/storage/proffer.storage.istore.md new file mode 100644 index 0000000..e345d1e --- /dev/null +++ b/docs/api/storage/proffer.storage.istore.md @@ -0,0 +1,301 @@ +# IStore + +Namespace: Proffer.Storage + +A store allows to save, list or read files on a container in its configured [IStorageProvider](./proffer.storage.istorageprovider.md). + +```csharp +public interface IStore +``` + +## Properties + +### **Name** + +Gets the name of the store. + +```csharp +public abstract string Name { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Methods + +### **InitAsync(CancellationToken)** + +Initializes the store by creating a container in its [IStorageProvider](./proffer.storage.istorageprovider.md). + +```csharp +Task InitAsync(CancellationToken cancellationToken) +``` + +#### Parameters + +`cancellationToken` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)
+ +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. + +### **ListAsync(String, Boolean, Boolean)** + +Lists the files under . + +```csharp +ValueTask ListAsync(string path, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+The list under . + +### **ListAsync(String, String, Boolean, Boolean)** + +Lists the files under matching the . + +```csharp +ValueTask ListAsync(string path, string searchPattern, bool recursive, bool withMetadata) +``` + +#### Parameters + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`searchPattern` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The search pattern. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+The list under matching the . + +### **GetAsync(IPrivateFileReference, Boolean)** + +Gets the file reference from path. + +```csharp +ValueTask GetAsync(IPrivateFileReference file, bool withMetadata) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+The at path. + +### **GetAsync(Uri, Boolean)** + +Gets the file reference from URI. + +```csharp +ValueTask GetAsync(Uri uri, bool withMetadata) +``` + +#### Parameters + +`uri` Uri
+The file uniform resource identifier (URI). + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+The at path. + +#### Exceptions + +[InvalidOperationException](https://docs.microsoft.com/en-us/dotnet/api/system.invalidoperationexception)
+ +### **DeleteAsync(IPrivateFileReference)** + +Deletes the file. + +```csharp +Task DeleteAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+A task that represents the asynchronous operation. + +### **ReadAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +ValueTask ReadAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +ValueTask<Stream>
+A containing the file content. + +### **ReadAllBytesAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +ValueTask ReadAllBytesAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +ValueTask<Byte[]>
+A containing the file content. + +### **ReadAllTextAsync(IPrivateFileReference)** + +Reads the file content. + +```csharp +ValueTask ReadAllTextAsync(IPrivateFileReference file) +``` + +#### Parameters + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +#### Returns + +ValueTask<String>
+A containing the file content. + +### **SaveAsync(Byte[], IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +ValueTask SaveAsync(Byte[] data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The file content. + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` [OverwritePolicy](./proffer.storage.overwritepolicy.md)
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+The saved . + +#### Exceptions + +[FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md)
+ +### **SaveAsync(Stream, IPrivateFileReference, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +ValueTask SaveAsync(Stream data, IPrivateFileReference file, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`data` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The file content. + +`file` [IPrivateFileReference](./proffer.storage.iprivatefilereference.md)
+The reference holding the file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` [OverwritePolicy](./proffer.storage.overwritepolicy.md)
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+The saved . + +#### Exceptions + +[FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md)
+ +### **GetSharedAccessSignatureAsync(ISharedAccessPolicy)** + +Gets a shared access signature. + +```csharp +ValueTask GetSharedAccessSignatureAsync(ISharedAccessPolicy policy) +``` + +#### Parameters + +`policy` [ISharedAccessPolicy](./proffer.storage.isharedaccesspolicy.md)
+The policy. + +#### Returns + +ValueTask<String>
+A shared access signature to read or list the store files. + +#### Exceptions + +[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception)
diff --git a/docs/api/storage/proffer.storage.istoreextensions.md b/docs/api/storage/proffer.storage.istoreextensions.md new file mode 100644 index 0000000..2b9a3bb --- /dev/null +++ b/docs/api/storage/proffer.storage.istoreextensions.md @@ -0,0 +1,261 @@ +# IStoreExtensions + +Namespace: Proffer.Storage + +[IStore](./proffer.storage.istore.md) extension methods. + +```csharp +public static class IStoreExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [IStoreExtensions](./proffer.storage.istoreextensions.md) + +## Methods + +### **ListAsync(IStore, String, Boolean, Boolean)** + +Lists the files under . + +```csharp +public static ValueTask ListAsync(IStore store, string path, bool recursive, bool withMetadata) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under . + +### **ListAsync(IStore, String, String, Boolean, Boolean)** + +Lists the files under matching the . + +```csharp +public static ValueTask ListAsync(IStore store, string path, string searchPattern, bool recursive, bool withMetadata) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The path. + +`searchPattern` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The search pattern. + +`recursive` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, recurse the listing across folders. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for each file. + +#### Returns + +ValueTask<IFileReference[]>
+ + The list under matching the . + +### **DeleteAsync(IStore, String)** + +Deletes the file. + +```csharp +public static Task DeleteAsync(IStore store, string path) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. + +#### Returns + +[Task](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task)
+ + A task that represents the asynchronous operation. + +### **GetAsync(IStore, String, Boolean)** + +Gets the file reference from path. + +```csharp +public static ValueTask GetAsync(IStore store, string path, bool withMetadata) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. + +`withMetadata` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+If set to true, fetch metadata for the file. + +#### Returns + +ValueTask<IFileReference>
+ + The at path. + +### **ReadAsync(IStore, String)** + +Reads the file content. + +```csharp +public static ValueTask ReadAsync(IStore store, string path) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. + +#### Returns + +ValueTask<Stream>
+ + A containing the file content. + +### **ReadAllBytesAsync(IStore, String)** + +Reads the file content. + +```csharp +public static ValueTask ReadAllBytesAsync(IStore store, string path) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. + +#### Returns + +ValueTask<Byte[]>
+ + A containing the file content. + +### **ReadAllTextAsync(IStore, String)** + +Reads the file content. + +```csharp +public static ValueTask ReadAllTextAsync(IStore store, string path) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. + +#### Returns + +ValueTask<String>
+ + A containing the file content. + +### **SaveAsync(IStore, Byte[], String, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public static ValueTask SaveAsync(IStore store, Byte[] data, string path, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`data` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The file content. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` [OverwritePolicy](./proffer.storage.overwritepolicy.md)
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +#### Exceptions + +[FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md)
+ +### **SaveAsync(IStore, Stream, String, String, OverwritePolicy, IDictionary<String, String>)** + +Saves the file. + +```csharp +public static ValueTask SaveAsync(IStore store, Stream data, string path, string contentType, OverwritePolicy overwritePolicy, IDictionary metadata) +``` + +#### Parameters + +`store` [IStore](./proffer.storage.istore.md)
+The store. + +`data` [Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream)
+The file content. + +`path` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file path. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The content-type of the file. + +`overwritePolicy` [OverwritePolicy](./proffer.storage.overwritepolicy.md)
+The overwrite policy. + +`metadata` [IDictionary<String, String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.idictionary-2)
+The metadata. + +#### Returns + +ValueTask<IFileReference>
+ + The saved . + +#### Exceptions + +[FileAlreadyExistsException](./proffer.storage.exceptions.filealreadyexistsexception.md)
diff --git a/docs/api/storage/proffer.storage.overwritepolicy.md b/docs/api/storage/proffer.storage.overwritepolicy.md new file mode 100644 index 0000000..24a66ba --- /dev/null +++ b/docs/api/storage/proffer.storage.overwritepolicy.md @@ -0,0 +1,20 @@ +# OverwritePolicy + +Namespace: Proffer.Storage + +Defines an overwrite policy when saving a file to a store. + +```csharp +public enum OverwritePolicy +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Enum](https://docs.microsoft.com/en-us/dotnet/api/system.enum) → [OverwritePolicy](./proffer.storage.overwritepolicy.md)
+Implements [IComparable](https://docs.microsoft.com/en-us/dotnet/api/system.icomparable), [IFormattable](https://docs.microsoft.com/en-us/dotnet/api/system.iformattable), [IConvertible](https://docs.microsoft.com/en-us/dotnet/api/system.iconvertible) + +## Fields + +| Name | Value | Description | +| --- | --: | --- | +| Always | 0 | Always overwrite. | +| IfContentModified | 1 | Overwrite only if the file content is modified. | +| Never | 2 | Never overwrite. | diff --git a/docs/api/storage/proffer.storage.sharedaccesspermissions.md b/docs/api/storage/proffer.storage.sharedaccesspermissions.md new file mode 100644 index 0000000..a177ac2 --- /dev/null +++ b/docs/api/storage/proffer.storage.sharedaccesspermissions.md @@ -0,0 +1,24 @@ +# SharedAccessPermissions + +Namespace: Proffer.Storage + +Specifies the set of possible permissions for a shared access policy. + +```csharp +public enum SharedAccessPermissions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Enum](https://docs.microsoft.com/en-us/dotnet/api/system.enum) → [SharedAccessPermissions](./proffer.storage.sharedaccesspermissions.md)
+Implements [IComparable](https://docs.microsoft.com/en-us/dotnet/api/system.icomparable), [IFormattable](https://docs.microsoft.com/en-us/dotnet/api/system.iformattable), [IConvertible](https://docs.microsoft.com/en-us/dotnet/api/system.iconvertible) + +## Fields + +| Name | Value | Description | +| --- | --: | --- | +| None | 0 | No shared access granted. | +| Read | 1 | Read access granted. | +| Write | 2 | Write access granted. | +| Delete | 4 | Delete access granted. | +| List | 8 | List access granted. | +| Add | 16 | Add access granted. | +| Create | 32 | Create access granted. | diff --git a/docs/api/storage/proffer.storage.sharedaccesspolicy.md b/docs/api/storage/proffer.storage.sharedaccesspolicy.md new file mode 100644 index 0000000..29f7871 --- /dev/null +++ b/docs/api/storage/proffer.storage.sharedaccesspolicy.md @@ -0,0 +1,60 @@ +# SharedAccessPolicy + +Namespace: Proffer.Storage + +Represents a simple shared access policy, which specifies the start time, expiry time, and permissions for a shared access signature. + +```csharp +public class SharedAccessPolicy : ISharedAccessPolicy +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [SharedAccessPolicy](./proffer.storage.sharedaccesspolicy.md)
+Implements [ISharedAccessPolicy](./proffer.storage.isharedaccesspolicy.md) + +## Properties + +### **StartTime** + +Gets or sets the start time. + +```csharp +public Nullable StartTime { get; set; } +``` + +#### Property Value + +[Nullable<DateTimeOffset>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+ +### **ExpiryTime** + +Gets or sets the expiry time. + +```csharp +public Nullable ExpiryTime { get; set; } +``` + +#### Property Value + +[Nullable<DateTimeOffset>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+ +### **Permissions** + +Gets or sets the permissions. + +```csharp +public SharedAccessPermissions Permissions { get; set; } +``` + +#### Property Value + +[SharedAccessPermissions](./proffer.storage.sharedaccesspermissions.md)
+ +## Constructors + +### **SharedAccessPolicy()** + + + +```csharp +public SharedAccessPolicy() +``` diff --git a/docs/api/storage/proffer.storage.storageservicecollectionextensions.md b/docs/api/storage/proffer.storage.storageservicecollectionextensions.md new file mode 100644 index 0000000..7b54f90 --- /dev/null +++ b/docs/api/storage/proffer.storage.storageservicecollectionextensions.md @@ -0,0 +1,77 @@ +# StorageServiceCollectionExtensions + +Namespace: Proffer.Storage + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class StorageServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StorageServiceCollectionExtensions](./proffer.storage.storageservicecollectionextensions.md) + +## Methods + +### **AddStorage(IServiceCollection)** + +Registers Proffer.Storage services. + +```csharp +public static IServiceCollection AddStorage(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. + +### **AddStorage(IServiceCollection, IConfigurationSection)** + +Registers Proffer.Storage services and configures it with the given section. + +```csharp +public static IServiceCollection AddStorage(IServiceCollection services, IConfigurationSection configurationSection) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +`configurationSection` IConfigurationSection
+The configuration section. + +#### Returns + +IServiceCollection
+The service collection. + +### **AddStorage(IServiceCollection, IConfigurationRoot, String)** + +Registers Proffer.Storage services and configures it from the given at section . + +```csharp +public static IServiceCollection AddStorage(IServiceCollection services, IConfigurationRoot configurationRoot, string sectionName) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +`configurationRoot` IConfigurationRoot
+The configuration root. + +`sectionName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the section. + +#### Returns + +IServiceCollection
+ + The service collection. diff --git a/docs/api/storage/proffer.storage.storebase.md b/docs/api/storage/proffer.storage.storebase.md new file mode 100644 index 0000000..abddb8a --- /dev/null +++ b/docs/api/storage/proffer.storage.storebase.md @@ -0,0 +1,43 @@ +# StoreBase + +Namespace: Proffer.Storage + +Abstract base typed store. + +```csharp +public abstract class StoreBase +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [StoreBase](./proffer.storage.storebase.md) + +## Properties + +### **Store** + +Gets the store. + +```csharp +public IStore Store { get; } +``` + +#### Property Value + +[IStore](./proffer.storage.istore.md)
+ +## Constructors + +### **StoreBase(String, IStorageFactory)** + +Initializes a new instance of the [StoreBase](./proffer.storage.storebase.md) class. + +```csharp +public StoreBase(string storeName, IStorageFactory storageFactory) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`storageFactory` [IStorageFactory](./proffer.storage.istoragefactory.md)
+The storage factory. diff --git a/docs/api/templating/handlebars/index.md b/docs/api/templating/handlebars/index.md new file mode 100644 index 0000000..3501ebf --- /dev/null +++ b/docs/api/templating/handlebars/index.md @@ -0,0 +1,11 @@ +# Proffer.Templating.Handlebars + +## Proffer.Templating + +[HandlebarsServiceCollectionExtensions](./proffer.templating.handlebarsservicecollectionextensions.md) + +## Proffer.Templating.Handlebars + +[HandlebarsTemplate](./proffer.templating.handlebars.handlebarstemplate.md) + +[HandlebarsTemplateProvider](./proffer.templating.handlebars.handlebarstemplateprovider.md) diff --git a/docs/api/templating/handlebars/proffer.templating.handlebars.handlebarstemplate.md b/docs/api/templating/handlebars/proffer.templating.handlebars.handlebarstemplate.md new file mode 100644 index 0000000..acdcde0 --- /dev/null +++ b/docs/api/templating/handlebars/proffer.templating.handlebars.handlebarstemplate.md @@ -0,0 +1,86 @@ +# HandlebarsTemplate + +Namespace: Proffer.Templating.Handlebars + +A template reference can be executed on a specific context using N:HandlebarsDotNet. + +```csharp +public class HandlebarsTemplate : Proffer.Templating.ITemplate +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HandlebarsTemplate](./proffer.templating.handlebars.handlebarstemplate.md)
+Implements ITemplate + +## Constructors + +### **HandlebarsTemplate(String)** + +Initializes a new instance of the [HandlebarsTemplate](./proffer.templating.handlebars.handlebarstemplate.md) class. + +```csharp +public HandlebarsTemplate(string templateContent) +``` + +#### Parameters + +`templateContent` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Content of the template. + +### **HandlebarsTemplate(IHandlebars, String)** + +Initializes a new instance of the [HandlebarsTemplate](./proffer.templating.handlebars.handlebarstemplate.md) class. + +```csharp +public HandlebarsTemplate(IHandlebars handlebars, string templateContent) +``` + +#### Parameters + +`handlebars` IHandlebars
+The Handlebars service. + +`templateContent` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Content of the template. + +## Methods + +### **Apply(Object)** + +Applies the specified context on the template. + +```csharp +public string Apply(object context) +``` + +#### Parameters + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ + The templated result. + +### **Apply(Object, IFormatProvider)** + +Applies the specified context on the template with format provider. + +```csharp +public string Apply(object context, IFormatProvider formatProvider) +``` + +#### Parameters + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +`formatProvider` [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider)
+The format provider. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ + The templated result. diff --git a/docs/api/templating/handlebars/proffer.templating.handlebars.handlebarstemplateprovider.md b/docs/api/templating/handlebars/proffer.templating.handlebars.handlebarstemplateprovider.md new file mode 100644 index 0000000..8f75ff2 --- /dev/null +++ b/docs/api/templating/handlebars/proffer.templating.handlebars.handlebarstemplateprovider.md @@ -0,0 +1,82 @@ +# HandlebarsTemplateProvider + +Namespace: Proffer.Templating.Handlebars + +A provider handles and compiles templates using N:HandlebarsDotNet. + +```csharp +public class HandlebarsTemplateProvider : Proffer.Templating.ITemplateProvider +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HandlebarsTemplateProvider](./proffer.templating.handlebars.handlebarstemplateprovider.md)
+Implements ITemplateProvider + +## Properties + +### **MimeTypes** + +Gets the MIME types. + +```csharp +public ISet MimeTypes { get; } +``` + +#### Property Value + +[ISet<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iset-1)
+ +### **Extensions** + +Gets the extensions. + +```csharp +public ISet Extensions { get; } +``` + +#### Property Value + +[ISet<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iset-1)
+ +## Constructors + +### **HandlebarsTemplateProvider()** + +Initializes a new instance of the [HandlebarsTemplateProvider](./proffer.templating.handlebars.handlebarstemplateprovider.md) class. + +```csharp +public HandlebarsTemplateProvider() +``` + +## Methods + +### **Compile(String)** + +Compiles the specified template content. + +```csharp +public ITemplate Compile(string templateContent) +``` + +#### Parameters + +`templateContent` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Content of the template. + +#### Returns + +ITemplate
+A compiled . + +### **CreateScope()** + +Creates a template provider scope. + +```csharp +public ITemplateProviderScope CreateScope() +``` + +#### Returns + +ITemplateProviderScope
+ + A new templating provider scope. diff --git a/docs/api/templating/handlebars/proffer.templating.handlebarsservicecollectionextensions.md b/docs/api/templating/handlebars/proffer.templating.handlebarsservicecollectionextensions.md new file mode 100644 index 0000000..8111758 --- /dev/null +++ b/docs/api/templating/handlebars/proffer.templating.handlebarsservicecollectionextensions.md @@ -0,0 +1,31 @@ +# HandlebarsServiceCollectionExtensions + +Namespace: Proffer.Templating + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class HandlebarsServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [HandlebarsServiceCollectionExtensions](./proffer.templating.handlebarsservicecollectionextensions.md) + +## Methods + +### **AddHandlebars(IServiceCollection)** + +Registers the Proffer.Templating services to use N:HandlebarsDotNet. + +```csharp +public static IServiceCollection AddHandlebars(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/templating/index.md b/docs/api/templating/index.md new file mode 100644 index 0000000..16121e9 --- /dev/null +++ b/docs/api/templating/index.md @@ -0,0 +1,33 @@ +# Proffer.Templating + +## Proffer.Templating + +[InvalidContextException](./proffer.templating.invalidcontextexception.md) + +[ITemplate](./proffer.templating.itemplate.md) + +[ITemplateLoader](./proffer.templating.itemplateloader.md) + +[ITemplateLoaderFactory](./proffer.templating.itemplateloaderfactory.md) + +[ITemplateProvider](./proffer.templating.itemplateprovider.md) + +[ITemplateProviderScope](./proffer.templating.itemplateproviderscope.md) + +[TemplateCollectionBase](./proffer.templating.templatecollectionbase.md) + +[TemplateCollectionBase<TStore>](./proffer.templating.templatecollectionbase-1.md) + +[TemplatingServiceCollectionExtensions](./proffer.templating.templatingservicecollectionextensions.md) + +## Proffer.Templating.Exceptions + +[ProviderNotFoundException](./proffer.templating.exceptions.providernotfoundexception.md) + +[TemplateNotFoundException](./proffer.templating.exceptions.templatenotfoundexception.md) + +## Proffer.Templating.Internal + +[TemplateLoader](./proffer.templating.internal.templateloader.md) + +[TemplateLoaderFactory](./proffer.templating.internal.templateloaderfactory.md) diff --git a/docs/api/templating/mustache/index.md b/docs/api/templating/mustache/index.md new file mode 100644 index 0000000..6c2873a --- /dev/null +++ b/docs/api/templating/mustache/index.md @@ -0,0 +1,11 @@ +# Proffer.Templating.Mustache + +## Proffer.Templating + +[MustacheServiceCollectionExtensions](./proffer.templating.mustacheservicecollectionextensions.md) + +## Proffer.Templating.Mustache + +[MustacheTemplate](./proffer.templating.mustache.mustachetemplate.md) + +[MustacheTemplateProvider](./proffer.templating.mustache.mustachetemplateprovider.md) diff --git a/docs/api/templating/mustache/proffer.templating.mustache.mustachetemplate.md b/docs/api/templating/mustache/proffer.templating.mustache.mustachetemplate.md new file mode 100644 index 0000000..a0fc662 --- /dev/null +++ b/docs/api/templating/mustache/proffer.templating.mustache.mustachetemplate.md @@ -0,0 +1,78 @@ +# MustacheTemplate + +Namespace: Proffer.Templating.Mustache + +A template reference can be executed on a specific context using N:Mustache. + +```csharp +public class MustacheTemplate : Proffer.Templating.ITemplate +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [MustacheTemplate](./proffer.templating.mustache.mustachetemplate.md)
+Implements ITemplate + +## Constructors + +### **MustacheTemplate(String)** + +Initializes a new instance of the [MustacheTemplate](./proffer.templating.mustache.mustachetemplate.md) class. + +```csharp +public MustacheTemplate(string templateContent) +``` + +#### Parameters + +`templateContent` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Content of the template. + +## Methods + +### **Apply(Object)** + +Applies the specified context on the template. + +```csharp +public string Apply(object context) +``` + +#### Parameters + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ + The templated result. + +#### Exceptions + +Proffer.Templating.InvalidContextException
+ +### **Apply(Object, IFormatProvider)** + +Applies the specified context on the template with format provider. + +```csharp +public string Apply(object context, IFormatProvider formatProvider) +``` + +#### Parameters + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +`formatProvider` [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider)
+The format provider. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ + The templated result. + +#### Exceptions + +Proffer.Templating.InvalidContextException
diff --git a/docs/api/templating/mustache/proffer.templating.mustache.mustachetemplateprovider.md b/docs/api/templating/mustache/proffer.templating.mustache.mustachetemplateprovider.md new file mode 100644 index 0000000..195f4cc --- /dev/null +++ b/docs/api/templating/mustache/proffer.templating.mustache.mustachetemplateprovider.md @@ -0,0 +1,103 @@ +# MustacheTemplateProvider + +Namespace: Proffer.Templating.Mustache + +A provider handles and compiles templates using N:Mustache. + +```csharp +public class MustacheTemplateProvider : Proffer.Templating.ITemplateProvider, Proffer.Templating.ITemplateProviderScope +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [MustacheTemplateProvider](./proffer.templating.mustache.mustachetemplateprovider.md)
+Implements ITemplateProvider, ITemplateProviderScope + +## Properties + +### **MimeTypes** + +Gets the MIME types. + +```csharp +public ISet MimeTypes { get; } +``` + +#### Property Value + +[ISet<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iset-1)
+ +### **Extensions** + +Gets the extensions. + +```csharp +public ISet Extensions { get; } +``` + +#### Property Value + +[ISet<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iset-1)
+ +## Constructors + +### **MustacheTemplateProvider()** + +Initializes a new instance of the [MustacheTemplateProvider](./proffer.templating.mustache.mustachetemplateprovider.md) class. + +```csharp +public MustacheTemplateProvider() +``` + +## Methods + +### **Compile(String)** + +Compiles the specified template content. + +```csharp +public ITemplate Compile(string templateContent) +``` + +#### Parameters + +`templateContent` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Content of the template. + +#### Returns + +ITemplate
+ + A new compiled from the content. + +### **CreateScope()** + +Creates a template provider scope. + +```csharp +public ITemplateProviderScope CreateScope() +``` + +#### Returns + +ITemplateProviderScope
+ + A new templating provider scope. + +### **RegisterPartial(String, String)** + +Registers a partial template with a name. + +```csharp +public void RegisterPartial(string name, string template) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name. + +`template` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template. + +#### Exceptions + +[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception)
diff --git a/docs/api/templating/mustache/proffer.templating.mustacheservicecollectionextensions.md b/docs/api/templating/mustache/proffer.templating.mustacheservicecollectionextensions.md new file mode 100644 index 0000000..0f846a1 --- /dev/null +++ b/docs/api/templating/mustache/proffer.templating.mustacheservicecollectionextensions.md @@ -0,0 +1,31 @@ +# MustacheServiceCollectionExtensions + +Namespace: Proffer.Templating + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class MustacheServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [MustacheServiceCollectionExtensions](./proffer.templating.mustacheservicecollectionextensions.md) + +## Methods + +### **AddMustache(IServiceCollection)** + +Registers the Proffer.Templating services to use N:Mustache. + +```csharp +public static IServiceCollection AddMustache(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/api/templating/proffer.templating.exceptions.providernotfoundexception.md b/docs/api/templating/proffer.templating.exceptions.providernotfoundexception.md new file mode 100644 index 0000000..60914c1 --- /dev/null +++ b/docs/api/templating/proffer.templating.exceptions.providernotfoundexception.md @@ -0,0 +1,131 @@ +# ProviderNotFoundException + +Namespace: Proffer.Templating.Exceptions + +Thrown when a matching provider was not found for a given template. + +```csharp +public class ProviderNotFoundException : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [ProviderNotFoundException](./proffer.templating.exceptions.providernotfoundexception.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **ProviderNotFoundException(String, String, String)** + +Initializes a new instance of the [ProviderNotFoundException](./proffer.templating.exceptions.providernotfoundexception.md) class. + +```csharp +public ProviderNotFoundException(string templateName, string extension, string contentType) +``` + +#### Parameters + +`templateName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the unmatched template. + +`extension` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The extension of the unmatched template. + +`contentType` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The MIME type of the unmatched template. diff --git a/docs/api/templating/proffer.templating.exceptions.templatenotfoundexception.md b/docs/api/templating/proffer.templating.exceptions.templatenotfoundexception.md new file mode 100644 index 0000000..6435c4e --- /dev/null +++ b/docs/api/templating/proffer.templating.exceptions.templatenotfoundexception.md @@ -0,0 +1,125 @@ +# TemplateNotFoundException + +Namespace: Proffer.Templating.Exceptions + +Thrown when a template was not found in the store. + +```csharp +public class TemplateNotFoundException : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [TemplateNotFoundException](./proffer.templating.exceptions.templatenotfoundexception.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **TemplateNotFoundException(String)** + +Initializes a new instance of the [TemplateNotFoundException](./proffer.templating.exceptions.templatenotfoundexception.md) class. + +```csharp +public TemplateNotFoundException(string templateName) +``` + +#### Parameters + +`templateName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the missing template. diff --git a/docs/api/templating/proffer.templating.internal.templateloader.md b/docs/api/templating/proffer.templating.internal.templateloader.md new file mode 100644 index 0000000..61b29a0 --- /dev/null +++ b/docs/api/templating/proffer.templating.internal.templateloader.md @@ -0,0 +1,54 @@ +# TemplateLoader + +Namespace: Proffer.Templating.Internal + +Loads template references from an Proffer.Storage.IStore and cache results. + +```csharp +public class TemplateLoader : Proffer.Templating.ITemplateLoader +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [TemplateLoader](./proffer.templating.internal.templateloader.md)
+Implements [ITemplateLoader](./proffer.templating.itemplateloader.md) + +## Constructors + +### **TemplateLoader(IStore, IEnumerable<ITemplateProvider>, IMemoryCache)** + +Initializes a new instance of the [TemplateLoader](./proffer.templating.internal.templateloader.md) class. + +```csharp +public TemplateLoader(IStore store, IEnumerable providers, IMemoryCache memoryCache) +``` + +#### Parameters + +`store` IStore
+The store. + +`providers` [IEnumerable<ITemplateProvider>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The providers. + +`memoryCache` IMemoryCache
+The memory cache. + +## Methods + +### **GetTemplate(String)** + +Gets a template by name. + +```csharp +public Task GetTemplate(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template name. + +#### Returns + +[Task<ITemplate>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1)
+ + The matching . diff --git a/docs/api/templating/proffer.templating.internal.templateloaderfactory.md b/docs/api/templating/proffer.templating.internal.templateloaderfactory.md new file mode 100644 index 0000000..598f7f1 --- /dev/null +++ b/docs/api/templating/proffer.templating.internal.templateloaderfactory.md @@ -0,0 +1,73 @@ +# TemplateLoaderFactory + +Namespace: Proffer.Templating.Internal + +Creates [ITemplateLoader](./proffer.templating.itemplateloader.md) from Proffer.Storage.IStore. + +```csharp +public class TemplateLoaderFactory : Proffer.Templating.ITemplateLoaderFactory +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [TemplateLoaderFactory](./proffer.templating.internal.templateloaderfactory.md)
+Implements [ITemplateLoaderFactory](./proffer.templating.itemplateloaderfactory.md) + +## Constructors + +### **TemplateLoaderFactory(IEnumerable<ITemplateProvider>, IMemoryCache)** + +Initializes a new instance of the [TemplateLoaderFactory](./proffer.templating.internal.templateloaderfactory.md) class. + +```csharp +public TemplateLoaderFactory(IEnumerable providers, IMemoryCache memoryCache) +``` + +#### Parameters + +`providers` [IEnumerable<ITemplateProvider>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+The providers. + +`memoryCache` IMemoryCache
+The memory cache. + +## Methods + +### **Create(IStore)** + +Creates a template loader from the specified store. + +```csharp +public ITemplateLoader Create(IStore store) +``` + +#### Parameters + +`store` IStore
+The store. + +#### Returns + +[ITemplateLoader](./proffer.templating.itemplateloader.md)
+ + A that loads templates from the given . + +### **Create(IStore, String)** + +Creates a template loader from the specified store with the specified cache scope. + +```csharp +public ITemplateLoader Create(IStore store, string scope) +``` + +#### Parameters + +`store` IStore
+The store. + +`scope` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The scope. + +#### Returns + +[ITemplateLoader](./proffer.templating.itemplateloader.md)
+ + A that loads templates from the given . diff --git a/docs/api/templating/proffer.templating.invalidcontextexception.md b/docs/api/templating/proffer.templating.invalidcontextexception.md new file mode 100644 index 0000000..c183535 --- /dev/null +++ b/docs/api/templating/proffer.templating.invalidcontextexception.md @@ -0,0 +1,125 @@ +# InvalidContextException + +Namespace: Proffer.Templating + +Thrown when the generation context is invalid for a template. + +```csharp +public class InvalidContextException : System.Exception, System.Runtime.Serialization.ISerializable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) → [InvalidContextException](./proffer.templating.invalidcontextexception.md)
+Implements [ISerializable](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.iserializable) + +## Properties + +### **TargetSite** + + + +```csharp +public MethodBase TargetSite { get; } +``` + +#### Property Value + +[MethodBase](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase)
+ +### **StackTrace** + + + +```csharp +public string StackTrace { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Message** + + + +```csharp +public string Message { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Data** + + + +```csharp +public IDictionary Data { get; } +``` + +#### Property Value + +[IDictionary](https://docs.microsoft.com/en-us/dotnet/api/system.collections.idictionary)
+ +### **InnerException** + + + +```csharp +public Exception InnerException { get; } +``` + +#### Property Value + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **HelpLink** + + + +```csharp +public string HelpLink { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Source** + + + +```csharp +public string Source { get; set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **HResult** + + + +```csharp +public int HResult { get; set; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +## Constructors + +### **InvalidContextException(Exception)** + +Initializes a new instance of the [InvalidContextException](./proffer.templating.invalidcontextexception.md) class. + +```csharp +public InvalidContextException(Exception innerException) +``` + +#### Parameters + +`innerException` [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+The inner exception. diff --git a/docs/api/templating/proffer.templating.itemplate.md b/docs/api/templating/proffer.templating.itemplate.md new file mode 100644 index 0000000..e209e4e --- /dev/null +++ b/docs/api/templating/proffer.templating.itemplate.md @@ -0,0 +1,59 @@ +# ITemplate + +Namespace: Proffer.Templating + +A template reference can be executed on a specific context using an Apply method. + +```csharp +public interface ITemplate +``` + +## Methods + +### **Apply(Object)** + +Applies the specified context on the template. + +```csharp +string Apply(object context) +``` + +#### Parameters + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The templated result. + +#### Exceptions + +[InvalidContextException](./proffer.templating.invalidcontextexception.md)
+ +### **Apply(Object, IFormatProvider)** + +Applies the specified context on the template with format provider. + +```csharp +string Apply(object context, IFormatProvider formatProvider) +``` + +#### Parameters + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +`formatProvider` [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider)
+The format provider. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ + The templated result. + +#### Exceptions + +[InvalidContextException](./proffer.templating.invalidcontextexception.md)
diff --git a/docs/api/templating/proffer.templating.itemplateloader.md b/docs/api/templating/proffer.templating.itemplateloader.md new file mode 100644 index 0000000..34671a4 --- /dev/null +++ b/docs/api/templating/proffer.templating.itemplateloader.md @@ -0,0 +1,29 @@ +# ITemplateLoader + +Namespace: Proffer.Templating + +Loads template references. + +```csharp +public interface ITemplateLoader +``` + +## Methods + +### **GetTemplate(String)** + +Gets a template by name. + +```csharp +Task GetTemplate(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template name. + +#### Returns + +[Task<ITemplate>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1)
+The matching . diff --git a/docs/api/templating/proffer.templating.itemplateloaderfactory.md b/docs/api/templating/proffer.templating.itemplateloaderfactory.md new file mode 100644 index 0000000..22a36df --- /dev/null +++ b/docs/api/templating/proffer.templating.itemplateloaderfactory.md @@ -0,0 +1,50 @@ +# ITemplateLoaderFactory + +Namespace: Proffer.Templating + +Creates [ITemplateLoader](./proffer.templating.itemplateloader.md) from Proffer.Storage.IStore. + +```csharp +public interface ITemplateLoaderFactory +``` + +## Methods + +### **Create(IStore)** + +Creates a template loader from the specified store. + +```csharp +ITemplateLoader Create(IStore store) +``` + +#### Parameters + +`store` IStore
+The store. + +#### Returns + +[ITemplateLoader](./proffer.templating.itemplateloader.md)
+A that loads templates from the given . + +### **Create(IStore, String)** + +Creates a template loader from the specified store with the specified cache scope. + +```csharp +ITemplateLoader Create(IStore store, string scope) +``` + +#### Parameters + +`store` IStore
+The store. + +`scope` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The cache scope. + +#### Returns + +[ITemplateLoader](./proffer.templating.itemplateloader.md)
+A that loads templates from the given . diff --git a/docs/api/templating/proffer.templating.itemplateprovider.md b/docs/api/templating/proffer.templating.itemplateprovider.md new file mode 100644 index 0000000..8b82644 --- /dev/null +++ b/docs/api/templating/proffer.templating.itemplateprovider.md @@ -0,0 +1,50 @@ +# ITemplateProvider + +Namespace: Proffer.Templating + +A provider handles and compiles templates using a particular templating library. + +```csharp +public interface ITemplateProvider +``` + +## Properties + +### **MimeTypes** + +Gets the MIME types. + +```csharp +public abstract ISet MimeTypes { get; } +``` + +#### Property Value + +[ISet<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iset-1)
+ +### **Extensions** + +Gets the extensions. + +```csharp +public abstract ISet Extensions { get; } +``` + +#### Property Value + +[ISet<String>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iset-1)
+ +## Methods + +### **CreateScope()** + +Creates a template provider scope. + +```csharp +ITemplateProviderScope CreateScope() +``` + +#### Returns + +[ITemplateProviderScope](./proffer.templating.itemplateproviderscope.md)
+A new templating provider scope. diff --git a/docs/api/templating/proffer.templating.itemplateproviderscope.md b/docs/api/templating/proffer.templating.itemplateproviderscope.md new file mode 100644 index 0000000..aac7214 --- /dev/null +++ b/docs/api/templating/proffer.templating.itemplateproviderscope.md @@ -0,0 +1,49 @@ +# ITemplateProviderScope + +Namespace: Proffer.Templating + +Templating scope for a configured provider. + +```csharp +public interface ITemplateProviderScope +``` + +## Methods + +### **Compile(String)** + +Compiles the specified template content. + +```csharp +ITemplate Compile(string templateContent) +``` + +#### Parameters + +`templateContent` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Content of the template. + +#### Returns + +[ITemplate](./proffer.templating.itemplate.md)
+A new compiled from the content. + +### **RegisterPartial(String, String)** + +Registers a partial template with a name. + +```csharp +void RegisterPartial(string name, string template) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name. + +`template` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template. + +#### Exceptions + +[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception)
diff --git a/docs/api/templating/proffer.templating.templatecollectionbase-1.md b/docs/api/templating/proffer.templating.templatecollectionbase-1.md new file mode 100644 index 0000000..4659acf --- /dev/null +++ b/docs/api/templating/proffer.templating.templatecollectionbase-1.md @@ -0,0 +1,48 @@ +# TemplateCollectionBase<TStore> + +Namespace: Proffer.Templating + +Abstract base class to load and apply templates from a typed . + +```csharp +public abstract class TemplateCollectionBase : TemplateCollectionBase +``` + +#### Type Parameters + +`TStore`
+The type of the store. + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [TemplateCollectionBase](./proffer.templating.templatecollectionbase.md) → [TemplateCollectionBase<TStore>](./proffer.templating.templatecollectionbase-1.md) + +## Properties + +### **Loader** + +Gets the templates loader. + +```csharp +public ITemplateLoader Loader { get; } +``` + +#### Property Value + +[ITemplateLoader](./proffer.templating.itemplateloader.md)
+ +## Constructors + +### **TemplateCollectionBase(TStore, ITemplateLoaderFactory)** + +Initializes a new instance of the [TemplateCollectionBase<TStore>](./proffer.templating.templatecollectionbase-1.md) class. + +```csharp +public TemplateCollectionBase(TStore store, ITemplateLoaderFactory templateLoaderFactory) +``` + +#### Parameters + +`store` TStore
+The typed store. + +`templateLoaderFactory` [ITemplateLoaderFactory](./proffer.templating.itemplateloaderfactory.md)
+The template loader factory. diff --git a/docs/api/templating/proffer.templating.templatecollectionbase.md b/docs/api/templating/proffer.templating.templatecollectionbase.md new file mode 100644 index 0000000..d6e237d --- /dev/null +++ b/docs/api/templating/proffer.templating.templatecollectionbase.md @@ -0,0 +1,94 @@ +# TemplateCollectionBase + +Namespace: Proffer.Templating + +Abstract base class to load and apply templates from a named Proffer.Storage.IStore. + +```csharp +public abstract class TemplateCollectionBase +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [TemplateCollectionBase](./proffer.templating.templatecollectionbase.md) + +## Properties + +### **Loader** + +Gets the templates loader. + +```csharp +public ITemplateLoader Loader { get; } +``` + +#### Property Value + +[ITemplateLoader](./proffer.templating.itemplateloader.md)
+ +## Constructors + +### **TemplateCollectionBase(String, IStorageFactory, ITemplateLoaderFactory)** + +Initializes a new instance of the [TemplateCollectionBase](./proffer.templating.templatecollectionbase.md) class. + +```csharp +public TemplateCollectionBase(string storeName, IStorageFactory storageFactory, ITemplateLoaderFactory templateLoaderFactory) +``` + +#### Parameters + +`storeName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the store. + +`storageFactory` IStorageFactory
+The storage factory. + +`templateLoaderFactory` [ITemplateLoaderFactory](./proffer.templating.itemplateloaderfactory.md)
+The template loader factory. + +## Methods + +### **LoadAndApplyTemplate(String, Object)** + +Loads the template and applies context. + +```csharp +protected Task LoadAndApplyTemplate(string templatePath, object context) +``` + +#### Parameters + +`templatePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template path. + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +#### Returns + +[Task<String>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1)
+The templated result. + +### **LoadAndApplyTemplate(String, Object, IFormatProvider)** + +Loads the template and applies context. + +```csharp +protected Task LoadAndApplyTemplate(string templatePath, object context, IFormatProvider formatProvider) +``` + +#### Parameters + +`templatePath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The template path. + +`context` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The context. + +`formatProvider` [IFormatProvider](https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider)
+The format provider. + +#### Returns + +[Task<String>](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1)
+ + The templated result. diff --git a/docs/api/templating/proffer.templating.templatingservicecollectionextensions.md b/docs/api/templating/proffer.templating.templatingservicecollectionextensions.md new file mode 100644 index 0000000..0e34ef9 --- /dev/null +++ b/docs/api/templating/proffer.templating.templatingservicecollectionextensions.md @@ -0,0 +1,31 @@ +# TemplatingServiceCollectionExtensions + +Namespace: Proffer.Templating + +Microsoft.Extensions.DependencyInjection.IServiceCollection extension methods. + +```csharp +public static class TemplatingServiceCollectionExtensions +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [TemplatingServiceCollectionExtensions](./proffer.templating.templatingservicecollectionextensions.md) + +## Methods + +### **AddTemplating(IServiceCollection)** + +Registers Proffer.Templating services. + +```csharp +public static IServiceCollection AddTemplating(IServiceCollection services) +``` + +#### Parameters + +`services` IServiceCollection
+The service collection. + +#### Returns + +IServiceCollection
+The service collection. diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png new file mode 100644 index 0000000..1945cd9 Binary files /dev/null and b/docs/apple-touch-icon.png differ diff --git a/docs/assets/images/banner.png b/docs/assets/images/banner.png new file mode 100644 index 0000000..019acd3 Binary files /dev/null and b/docs/assets/images/banner.png differ diff --git a/docs/assets/images/logo.png b/docs/assets/images/logo.png new file mode 100644 index 0000000..4a545c9 Binary files /dev/null and b/docs/assets/images/logo.png differ diff --git a/docs/browserconfig.xml b/docs/browserconfig.xml new file mode 100644 index 0000000..43efcd4 --- /dev/null +++ b/docs/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #5c2d91 + + + diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png new file mode 100644 index 0000000..a426a7e Binary files /dev/null and b/docs/favicon-16x16.png differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png new file mode 100644 index 0000000..cbea19d Binary files /dev/null and b/docs/favicon-32x32.png differ diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000..c7608ae Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/mstile-150x150.png b/docs/mstile-150x150.png new file mode 100644 index 0000000..893e32a Binary files /dev/null and b/docs/mstile-150x150.png differ diff --git a/docs/safari-pinned-tab.svg b/docs/safari-pinned-tab.svg new file mode 100644 index 0000000..7f75fda --- /dev/null +++ b/docs/safari-pinned-tab.svg @@ -0,0 +1,41 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + + + diff --git a/docs/site.webmanifest b/docs/site.webmanifest new file mode 100644 index 0000000..0012243 --- /dev/null +++ b/docs/site.webmanifest @@ -0,0 +1,20 @@ +{ + "name": "Proffer", + "short_name": "Proffer", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-384x384.png", + "sizes": "384x384", + "type": "image/png" + } + ], + "theme_color": "#5c2d91", + "background_color": "#5c2d91", + "start_url": "https://getproffer.net/", + "display": "standalone" +} diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000..f59ca68 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,16 @@ + + + + Proffer + Adrien Siffermann + https://github.com/asiffermann/proffer + + + + latest + true + en-US + true + + + \ No newline at end of file diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 0000000..f58e5ff --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/Proffer.Azure/Proffer.Azure.csproj b/src/Proffer.Azure/Proffer.Azure.csproj index 904b29f..ea50d79 100644 --- a/src/Proffer.Azure/Proffer.Azure.csproj +++ b/src/Proffer.Azure/Proffer.Azure.csproj @@ -1,19 +1,12 @@ - Proffer.Azure - Proffer.Azure Proffer Azure common abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + core/azure netstandard2 - latest - true - en-US diff --git a/src/Proffer.Email.InMemory/Proffer.Email.InMemory.csproj b/src/Proffer.Email.InMemory/Proffer.Email.InMemory.csproj index 578a3ee..d6b1ba5 100644 --- a/src/Proffer.Email.InMemory/Proffer.Email.InMemory.csproj +++ b/src/Proffer.Email.InMemory/Proffer.Email.InMemory.csproj @@ -1,19 +1,12 @@ - + - Proffer.Email.InMemory - Proffer.Email.InMemory In-memory provider for Proffer.Email abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + email/in-memory netstandard2 - latest - true - en-US diff --git a/src/Proffer.Email.SendGrid/Proffer.Email.SendGrid.csproj b/src/Proffer.Email.SendGrid/Proffer.Email.SendGrid.csproj index 02e022c..60b3de1 100644 --- a/src/Proffer.Email.SendGrid/Proffer.Email.SendGrid.csproj +++ b/src/Proffer.Email.SendGrid/Proffer.Email.SendGrid.csproj @@ -1,19 +1,12 @@ - Proffer.Email.SendGrid - Proffer.Email.SendGrid SendGrid provider for Proffer.Email abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + email/sendgrid netstandard2 - latest - true - en-US diff --git a/src/Proffer.Email.Smtp/Proffer.Email.Smtp.csproj b/src/Proffer.Email.Smtp/Proffer.Email.Smtp.csproj index 857ee28..beb864b 100644 --- a/src/Proffer.Email.Smtp/Proffer.Email.Smtp.csproj +++ b/src/Proffer.Email.Smtp/Proffer.Email.Smtp.csproj @@ -1,19 +1,12 @@ - Proffer.Email.Smtp - Proffer.Email.Smtp SMTP provider for Proffer.Email abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + email/smtp netstandard2 - latest - true - en-US diff --git a/src/Proffer.Email/Proffer.Email.csproj b/src/Proffer.Email/Proffer.Email.csproj index 69be4e9..9d2ef0c 100644 --- a/src/Proffer.Email/Proffer.Email.csproj +++ b/src/Proffer.Email/Proffer.Email.csproj @@ -1,25 +1,18 @@ - Proffer.Email - Proffer.Email Templated email sending abstractions with providers. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + email netstandard2 - latest - true - en-US - + diff --git a/src/Proffer.Storage.Azure.Blobs/Proffer.Storage.Azure.Blobs.csproj b/src/Proffer.Storage.Azure.Blobs/Proffer.Storage.Azure.Blobs.csproj index 8407924..0529c92 100644 --- a/src/Proffer.Storage.Azure.Blobs/Proffer.Storage.Azure.Blobs.csproj +++ b/src/Proffer.Storage.Azure.Blobs/Proffer.Storage.Azure.Blobs.csproj @@ -1,19 +1,12 @@ - Proffer.Storage.Azure.Blobs - Proffer.Storage.Azure.Blobs Azure Blobs provider for Proffer.Storage abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + storage/azure/blobs netstandard2 - latest - true - en-US diff --git a/src/Proffer.Storage.FileSystem.Properties.Json/Proffer.Storage.FileSystem.Properties.Json.csproj b/src/Proffer.Storage.FileSystem.Properties.Json/Proffer.Storage.FileSystem.Properties.Json.csproj index 681a44f..8e54f85 100644 --- a/src/Proffer.Storage.FileSystem.Properties.Json/Proffer.Storage.FileSystem.Properties.Json.csproj +++ b/src/Proffer.Storage.FileSystem.Properties.Json/Proffer.Storage.FileSystem.Properties.Json.csproj @@ -1,19 +1,12 @@ - Proffer.Storage.FileSystem.Properties.Json - Proffer.Storage.FileSystem.Properties.Json File System based extended properties storage provider for the FileSystem provider. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + storage/filesystem/properties/json netstandard2 - latest - true - en-US diff --git a/src/Proffer.Storage.FileSystem.Server/Proffer.Storage.FileSystem.Server.csproj b/src/Proffer.Storage.FileSystem.Server/Proffer.Storage.FileSystem.Server.csproj index 9178b3f..25a96d6 100644 --- a/src/Proffer.Storage.FileSystem.Server/Proffer.Storage.FileSystem.Server.csproj +++ b/src/Proffer.Storage.FileSystem.Server/Proffer.Storage.FileSystem.Server.csproj @@ -1,19 +1,12 @@ - + - Proffer.Storage.FileSystem.Server - Proffer.Storage.FileSystem.Server File Server based on the Proffer.Storage.FileSystem provider. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + storage/filesystem/server netstandard2 - latest - true - en-US diff --git a/src/Proffer.Storage.FileSystem/Proffer.Storage.FileSystem.csproj b/src/Proffer.Storage.FileSystem/Proffer.Storage.FileSystem.csproj index 687da44..c76af50 100644 --- a/src/Proffer.Storage.FileSystem/Proffer.Storage.FileSystem.csproj +++ b/src/Proffer.Storage.FileSystem/Proffer.Storage.FileSystem.csproj @@ -1,19 +1,12 @@ - + - Proffer.Storage.FileSystem - Proffer.Storage.FileSystem FileSystem provider for Proffer.Storage abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + storage/filesystem netstandard2 - latest - true - en-US diff --git a/src/Proffer.Storage/Proffer.Storage.csproj b/src/Proffer.Storage/Proffer.Storage.csproj index 638d8c5..269c19f 100644 --- a/src/Proffer.Storage/Proffer.Storage.csproj +++ b/src/Proffer.Storage/Proffer.Storage.csproj @@ -1,19 +1,12 @@ - Proffer.Storage - Proffer.Storage File Storage abstractions with providers. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + storage netstandard2 - latest - true - en-US diff --git a/src/Proffer.Templating.Handlebars/Proffer.Templating.Handlebars.csproj b/src/Proffer.Templating.Handlebars/Proffer.Templating.Handlebars.csproj index 6a0f672..a57c967 100644 --- a/src/Proffer.Templating.Handlebars/Proffer.Templating.Handlebars.csproj +++ b/src/Proffer.Templating.Handlebars/Proffer.Templating.Handlebars.csproj @@ -1,19 +1,12 @@ - + - Proffer.Templating.Handlebars - Proffer.Templating.Handlebars Handlebars provider for Proffer.Templating abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + templating/handlebars netstandard2 - latest - true - en-US diff --git a/src/Proffer.Templating.Mustache/Proffer.Templating.Mustache.csproj b/src/Proffer.Templating.Mustache/Proffer.Templating.Mustache.csproj index 5114934..07b8f6b 100644 --- a/src/Proffer.Templating.Mustache/Proffer.Templating.Mustache.csproj +++ b/src/Proffer.Templating.Mustache/Proffer.Templating.Mustache.csproj @@ -1,19 +1,12 @@ - + - Proffer.Templating.Mustache - Proffer.Templating.Mustache Mustache.js provider for Proffer.Templating abstractions. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + templating/mustache netstandard2 - latest - true - en-US diff --git a/src/Proffer.Templating/Proffer.Templating.csproj b/src/Proffer.Templating/Proffer.Templating.csproj index 1cfd000..3a81700 100644 --- a/src/Proffer.Templating/Proffer.Templating.csproj +++ b/src/Proffer.Templating/Proffer.Templating.csproj @@ -1,19 +1,12 @@ - + - Proffer.Templating - Proffer.Templating Templating abstractions with providers. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + templating netstandard2 - latest - true - en-US diff --git a/src/Proffer/Proffer.csproj b/src/Proffer/Proffer.csproj index d51f89e..864ea93 100644 --- a/src/Proffer/Proffer.csproj +++ b/src/Proffer/Proffer.csproj @@ -1,19 +1,12 @@ - Proffer - Proffer .NET Core basic abstractions to configuration-driven providers. - Proffer - Adrien Siffermann - https://github.com/asiffermann/proffer + core netstandard2 - latest - true - en-US