Repository: weikio/PluginFramework
Branch: master
Commit: 5414bf718ef3
Files: 206
Total size: 403.6 KB
Directory structure:
gitextract_7nw5d5uj/
├── .editorconfig
├── .gitignore
├── LICENSE
├── README.md
├── THIRD-PARTY-NOTICES.txt
├── docs/
│ ├── logo.pdn
│ └── logo_transparent_color.pdn
├── global.json
├── samples/
│ ├── BlazorApp/
│ │ ├── App.razor
│ │ ├── BlazorApp.csproj
│ │ ├── Data/
│ │ │ ├── WeatherForecast.cs
│ │ │ └── WeatherForecastService.cs
│ │ ├── Pages/
│ │ │ ├── Counter.razor
│ │ │ ├── Error.razor
│ │ │ ├── FetchData.razor
│ │ │ ├── Index.razor
│ │ │ └── _Host.cshtml
│ │ ├── Program.cs
│ │ ├── Shared/
│ │ │ ├── MainLayout.razor
│ │ │ ├── NavMenu.razor
│ │ │ └── SurveyPrompt.razor
│ │ ├── Startup.cs
│ │ ├── _Imports.razor
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ └── wwwroot/
│ │ └── css/
│ │ ├── open-iconic/
│ │ │ ├── FONT-LICENSE
│ │ │ ├── ICON-LICENSE
│ │ │ ├── README.md
│ │ │ └── font/
│ │ │ └── fonts/
│ │ │ └── open-iconic.otf
│ │ └── site.css
│ ├── ConsoleApp/
│ │ ├── ConsoleApp.csproj
│ │ ├── FirstPlugin.cs
│ │ ├── MyPlugin.cs
│ │ ├── Program.cs
│ │ └── SecondPlugin.cs
│ ├── Shared/
│ │ ├── Weikio.PluginFramework.Samples.Shared/
│ │ │ ├── IMyPlugin.cs
│ │ │ ├── IOperator.cs
│ │ │ ├── IPlugin.cs
│ │ │ ├── RemainderOperator.cs
│ │ │ └── Weikio.PluginFramework.Samples.Shared.csproj
│ │ └── Weikio.PluginFramework.Samples.SharedPlugins/
│ │ ├── MinusOperator.cs
│ │ ├── MultiplyOperator.cs
│ │ ├── SecondSharedPlugin.cs
│ │ ├── SumOperator.cs
│ │ └── Weikio.PluginFramework.Samples.SharedPlugins.csproj
│ ├── WebApp/
│ │ ├── Controllers/
│ │ │ └── CalculatorController.cs
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WebApp.csproj
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── WebAppPluginsLibrary/
│ │ ├── CustomPlugin.cs
│ │ └── WebAppPluginsLibrary.csproj
│ ├── WebAppWithAppSettings/
│ │ ├── Controllers/
│ │ │ └── CalculatorController.cs
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WebAppWithAppSettings.csproj
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── WebAppWithDelegate/
│ │ ├── Controllers/
│ │ │ └── DelegateController.cs
│ │ ├── ExternalService.cs
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WebAppWithDelegate.csproj
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── WebAppWithNuget/
│ │ ├── Controllers/
│ │ │ └── CalculatorController.cs
│ │ ├── NugetLogger.cs
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WebAppWithNuget.csproj
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── WebAppWithRoslyn/
│ │ ├── Controllers/
│ │ │ └── RoslynController.cs
│ │ ├── ExternalService.cs
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WebAppWithRoslyn.csproj
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── WinFormsApp/
│ │ ├── DivideOperator.cs
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.cs
│ │ ├── Form1.resx
│ │ ├── Program.cs
│ │ └── WinFormsApp.csproj
│ ├── WinFormsPluginsLibrary/
│ │ ├── LabelPlugin.Designer.cs
│ │ ├── LabelPlugin.cs
│ │ ├── LabelPlugin.resx
│ │ ├── TestPlugin.Designer.cs
│ │ ├── TestPlugin.cs
│ │ ├── TestPlugin.resx
│ │ └── WinFormsPluginsLibrary.csproj
│ └── WpfApp/
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── DivideOperator.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ └── WpfApp.csproj
├── src/
│ ├── PluginFramework.sln
│ ├── Weikio.PluginFramework/
│ │ ├── Catalogs/
│ │ │ ├── AssemblyPluginCatalog.cs
│ │ │ ├── AssemblyPluginCatalogOptions.cs
│ │ │ ├── CompositePluginCatalog.cs
│ │ │ ├── Delegates/
│ │ │ │ ├── ConversionRule.cs
│ │ │ │ ├── DelegateCatalog.cs
│ │ │ │ ├── DelegatePluginCatalogOptions.cs
│ │ │ │ └── ParameterConversion.cs
│ │ │ ├── EmptyPluginCatalog.cs
│ │ │ ├── FolderPluginCatalog.cs
│ │ │ ├── FolderPluginCatalogOptions.cs
│ │ │ ├── TypePluginCatalog.cs
│ │ │ └── TypePluginCatalogOptions.cs
│ │ ├── Context/
│ │ │ ├── MetadataTypeFindingContext.cs
│ │ │ ├── PluginAssemblyLoadContext.cs
│ │ │ ├── PluginLoadContextOptions.cs
│ │ │ ├── RuntimeAssemblyHint.cs
│ │ │ └── UseHostApplicationAssembliesEnum.cs
│ │ ├── TypeFinding/
│ │ │ ├── ITypeFindingContext.cs
│ │ │ ├── TypeFinder.cs
│ │ │ ├── TypeFinderCriteria.cs
│ │ │ ├── TypeFinderCriteriaBuilder.cs
│ │ │ └── TypeFinderOptions.cs
│ │ └── Weikio.PluginFramework.csproj
│ ├── Weikio.PluginFramework.Abstractions/
│ │ ├── IPluginCatalog.cs
│ │ ├── IPluginCatalogExtensions.cs
│ │ ├── Plugin.cs
│ │ ├── PluginFrameworkOptions.cs
│ │ ├── PluginNameOptions.cs
│ │ └── Weikio.PluginFramework.Abstractions.csproj
│ ├── Weikio.PluginFramework.AspNetCore/
│ │ ├── DefaultPluginOption.cs
│ │ ├── PluginExtensions.cs
│ │ ├── PluginFrameworkInitializer.cs
│ │ ├── PluginProvider.cs
│ │ ├── ServiceCollectionExtensions.cs
│ │ ├── ServiceProviderExtensions.cs
│ │ └── Weikio.PluginFramework.AspNetCore.csproj
│ ├── Weikio.PluginFramework.Catalogs.NuGet/
│ │ ├── NugetFeedPluginCatalog.cs
│ │ ├── NugetFeedPluginCatalogOptions.cs
│ │ ├── NugetPackagePluginCatalog.cs
│ │ ├── NugetPluginCatalogOptions.cs
│ │ └── Weikio.PluginFramework.Catalogs.NuGet.csproj
│ ├── Weikio.PluginFramework.Catalogs.Roslyn/
│ │ ├── InvalidCodeException.cs
│ │ ├── RegularInitializer.cs
│ │ ├── RoslynPluginCatalog.cs
│ │ ├── RoslynPluginCatalogOptions.cs
│ │ ├── ScriptInitializer.cs
│ │ └── Weikio.PluginFramework.Catalogs.Roslyn.csproj
│ └── Weikio.PluginFramework.Configuration/
│ ├── CatalogConfiguration.cs
│ ├── Converters/
│ │ ├── AssemblyCatalogConfigurationCoverter.cs
│ │ ├── FolderCatalogConfigurationConverter.cs
│ │ └── IConfigurationToCatalogConverter.cs
│ ├── Providers/
│ │ ├── IPluginCatalogConfigurationLoader.cs
│ │ └── PluginCatalogConfigurationLoader.cs
│ └── Weikio.PluginFramework.Configuration.csproj
└── tests/
├── Assemblies/
│ ├── JsonNetNew/
│ │ ├── JsonNetNew.csproj
│ │ └── NewJsonResolver.cs
│ ├── JsonNetOld/
│ │ ├── JsonNetOld.csproj
│ │ └── OldJsonResolver.cs
│ ├── TestAssembly1/
│ │ ├── FirstPlugin.cs
│ │ ├── INotPluginInterface.cs
│ │ ├── NotAPlugin.cs
│ │ └── TestAssembly1.csproj
│ ├── TestAssembly2/
│ │ ├── SecondPlugin.cs
│ │ └── TestAssembly2.csproj
│ ├── TestAssembly3/
│ │ ├── TestAssembly3.csproj
│ │ └── ThirdAddon.cs
│ └── TestIntefaces/
│ ├── ICommand.cs
│ ├── IJsonVersionResolver.cs
│ └── TestIntefaces.csproj
├── integration/
│ ├── WebSites/
│ │ └── PluginFrameworkTestBed/
│ │ ├── Controllers/
│ │ │ └── WeatherForecastController.cs
│ │ ├── PluginFrameworkTestBed.csproj
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WeatherForecast.cs
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── Weikio.PluginFramework.AspNetCore.IntegrationTests/
│ │ ├── DefaultPluginTypeTests.cs
│ │ ├── TestBase.cs
│ │ ├── Weikio.PluginFramework.AspNetCore.IntegrationTests.csproj
│ │ └── xunit.runner.json
│ └── Weikio.PluginFramework.Catalogs.NuGet.Tests/
│ ├── NotThreadSafeResourceCollection.cs
│ ├── NuGet.Config
│ ├── NugetFeedPluginCatalogTests.cs
│ ├── NugetPackagePluginCatalogTests.cs
│ └── Weikio.PluginFramework.Catalogs.NuGet.Tests.csproj
└── unit/
├── Weikio.PluginFramework.Catalogs.Roslyn.Tests/
│ ├── RegularInitializerTests.cs
│ ├── RoslynPluginCatalogTests.cs
│ ├── ScriptInitializerTests.cs
│ ├── TestHelpers.cs
│ └── Weikio.PluginFramework.Catalogs.Roslyn.Tests.csproj
└── Weikio.PluginFramework.Tests/
├── AssemblyPluginCatalogTests.cs
├── DefaultOptionsTests.cs
├── DelegateCatalogTests.cs
├── FolderCatalogTests.cs
├── NotThreadSafeResourceCollection.cs
├── Plugins/
│ ├── AbstractPluginWithAttribute.cs
│ ├── AnotherPluginWithAttribute.cs
│ ├── MyPluginAttribute.cs
│ ├── PluginWithAttribute.cs
│ ├── TypePlugin.cs
│ └── TypePluginWithName.cs
├── TagTests.cs
├── TypeFinderTests.cs
├── TypePluginCatalogTests.cs
└── Weikio.PluginFramework.Tests.csproj
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root=true
# EditorConfig is awesome:http://EditorConfig.org
# top-most EditorConfig file
root = true
# Don't use tabs for indentation.
[*]
indent_style=space
charset=utf-8
end_of_line=crlf
trim_trailing_whitespace=false
insert_final_newline=false
indent_size=4
# Microsoft .NET properties
csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
dotnet_style_require_accessibility_modifiers=for_non_interface_members:hint
# ReSharper properties
resharper_autodetect_indent_settings=true
resharper_blank_lines_after_control_transfer_statements=1
resharper_blank_lines_around_block_case_section=1
resharper_blank_lines_around_single_line_local_method=1
resharper_blank_lines_before_block_statements=1
resharper_blank_lines_before_control_transfer_statements=1
resharper_blank_lines_before_multiline_statements=1
resharper_blank_lines_before_single_line_comment=1
resharper_braces_for_for=required
resharper_braces_for_foreach=required
resharper_braces_for_ifelse=required
resharper_braces_for_while=required
resharper_csharp_keep_blank_lines_in_code=1
resharper_csharp_keep_blank_lines_in_declarations=1
resharper_csharp_max_line_length=160
resharper_enforce_line_ending_style=true
resharper_keep_existing_embedded_arrangement=false
resharper_place_simple_embedded_statement_on_same_line=False
resharper_use_indent_from_vs=false
resharper_space_within_single_line_array_initializer_braces=true
resharper_accessor_owner_body=accessors_with_block_body
# ReSharper inspection severities
resharper_convert_to_null_coalescing_compound_assignment_highlighting=hint
resharper_enforce_foreach_statement_braces_highlighting=error
resharper_enforce_for_statement_braces_highlighting=error
resharper_enforce_if_statement_braces_highlighting=error
resharper_enforce_while_statement_braces_highlighting=error
resharper_identifier_typo_highlighting=none
resharper_redundant_base_qualifier_highlighting=warning
resharper_web_config_module_not_resolved_highlighting=warning
resharper_web_config_type_not_resolved_highlighting=warning
resharper_web_config_wrong_module_highlighting=warning
# (Please don't specify an indent_size here; that has too many unintended consequences.)
# Code files
[*.{cs,csx,vb,vbx}]
indent_size=4
insert_final_newline=true
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size=2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size=2
# JSON files
[*.json]
indent_size=2
# Dotnet code style settings:
[*.{cs,vb}]
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first=true
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field=false:error
dotnet_style_qualification_for_property=false:error
dotnet_style_qualification_for_method=false:error
dotnet_style_qualification_for_event=false:error
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion
dotnet_style_predefined_type_for_member_access=true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer=true:suggestion
dotnet_style_collection_initializer=true:suggestion
dotnet_style_coalesce_expression=true:suggestion
dotnet_style_null_propagation=true:suggestion
dotnet_style_explicit_tuple_names=true:suggestion
dotnet_naming_rule.private_members_with_underscore.symbols=private_fields
dotnet_naming_rule.private_members_with_underscore.style=prefix_underscore
dotnet_naming_rule.private_members_with_underscore.severity=suggestion
dotnet_naming_symbols.private_fields.applicable_kinds=field
dotnet_naming_symbols.private_fields.applicable_accessibilities=private
dotnet_naming_style.prefix_underscore.capitalization=camel_case
dotnet_naming_style.prefix_underscore.required_prefix=_
# CSharp code style settings:
[*.cs]
# Prefer "var" everywhere
csharp_style_var_for_built_in_types=true:error
csharp_style_var_when_type_is_apparent=true:error
csharp_style_var_elsewhere=true:error
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods=false:none
csharp_style_expression_bodied_constructors=false:none
csharp_style_expression_bodied_operators=false:none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties=true:none
csharp_style_expression_bodied_indexers=true:none
csharp_style_expression_bodied_accessors=true:none
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check=true:suggestion
csharp_style_pattern_matching_over_as_with_null_check=true:suggestion
csharp_style_inlined_variable_declaration=true:suggestion
csharp_style_throw_expression=true:suggestion
csharp_style_conditional_delegate_call=true:suggestion
# Newline settings
csharp_new_line_before_open_brace=all
csharp_new_line_before_else=true
csharp_new_line_before_catch=true
csharp_new_line_before_finally=true
csharp_new_line_before_members_in_object_initializers=true
csharp_new_line_before_members_in_anonymous_types=true
csharp_new_line_between_query_expression_clauses=true
csharp_preserve_single_line_statements=false
csharp_preserve_single_line_blocks=true
[{.eslintrc,.babelrc,.stylelintrc,jest.config,*.uproject,*.bowerrc,*.jsb3,*.jsb2,*.json}]
indent_style=space
indent_size=2
[*.{appxmanifest,asax,ascx,aspx,build,cs,cshtml,dtd,master,nuspec,razor,resw,resx,skin,vb,xaml,xamlx,xoml,xsd}]
indent_style=space
indent_size=4
tab_width=4
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2019 Weik.io
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Plugin Framework for .NET Core [](https://www.nuget.org/packages/Weikio.PluginFramework/)
With Plugin Framework for .NET Core, everything is a plugin! Plugin Framework is a **plugin platform** for .NET Core applications, including **ASP.NET Core, Blazor, WPF, Windows Forms and Console apps**. It is light-weight and easy to integrate and supports multiple different plugin catalogs, including .NET assemblies, **Nuget packages** and **Roslyn scripts**.
### Main Features
Here are some of the main features of Plugin Framework:
* Everything is a plugin! Deliver plugins as Nuget-packages, .NET assemblies, Roslyn scripts and more.
* Easy integration into a new or an existing .NET Core application.
* Automatic dependency management.
* Handles platform specific runtime DLLs and native DLLs when using Nuget-packages.
* MIT-licensed, commercial support available.
## Quickstart: Plugin Framework & ASP.NET Core
Plugin Framework is available from Nuget as a .NET Core 3.1 package. There's a separate package which makes it easier to work with plugins in an ASP.NET Core app:
[](https://www.nuget.org/packages/Weikio.PluginFramework.AspNetCore/)
```
Install-Package Weikio.PluginFramework.AspNetCore
```
Using Plugin Framework can be as easy as adding a single new line into ConfigureServices:
```
services.AddPluginFramework(@".\myplugins");
```
The code finds all the plugins (types that implement the custom IOperator-interface) from the myplugins-folder. The plugins can be used in a controller using constructor injection:
```
public CalculatorController(IEnumerable operator)
{
_operators = operators;
}
```
Alternatively, you can provide multiple plugin locations using catalogs:
```
var folderPluginCatalog = new FolderPluginCatalog(@".\myplugins", type =>
{
type.Implements();
});
var anotherPluginCatalog = new FolderPluginCatalog(@".\morePlugins", type =>
{
type.Implements();
});
services.AddPluginFramework()
.AddPluginCatalog(folderPluginCatalog)
.AddPluginCatalog(anotherPluginCatalog)
.AddPluginType();
```
## Samples
The following Plugin Framework samples are available from GitHub:
#### [Plugin Framework & .NET Console Application](https://github.com/weikio/PluginFramework/tree/master/samples/ConsoleApp)
#### [Plugin Framework & ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebApp)
#### [Plugin Framework & Blazor](https://github.com/weikio/PluginFramework/tree/master/samples/BlazorApp)
#### [Plugin Framework & WPF App](https://github.com/weikio/PluginFramework/tree/master/samples/WpfApp)
#### [Plugin Framework & WinForms App](https://github.com/weikio/PluginFramework/tree/master/samples/WinFormsApp)
#### [Nuget & Plugin Framework & ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithNuget)
#### [Roslyn & Plugin Framework & ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithRoslyn)
#### [Delegates & Plugin Framework & ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithDelegate)
#### [Tagging & WinForms App](https://github.com/weikio/PluginFramework/tree/master/samples/WinFormsApp)
#### [AppSettings.json & ASP.NET Core](https://github.com/weikio/PluginFramework/tree/master/samples/WebAppWithAppSettings)
## Background and introduction
For more details related to Plugin Framework's background, please see the following [introduction article from InfoQ](https://www.infoq.com/articles/Plugin-Framework-DotNet/).
## Main concepts
Using Plugin Framework concentrates around two concepts: **Plugins** and **Plugin Catalogs**.
### Plugin
Plugins are software programs, which provide extensions to an application. Plugins are designed to work with a single application. This app is often called the **host application**. The host application is designed in such a way that it can locate and run plugins dynamically, runtime. **The application works without the plugins, the plugins can't work without the host application.**
The host application defines the specifications for the plugins. In some applications a plugin can add new functionality into the UI. In other apps, plugins are used to distribute logs into multiple different systems. The host application defines what kind of extensions it supports.
Plugin-based software architecture can help in the following scenarios:
* Adding new features to application after the release
* Splitting large systems into smaller parts
* Updating always-on software system without restarting it
Plugins are dynamic, and they are often only loaded when the application needs them. Plugins are not usually compiled as part of the system but distributed as separate packages (assemblies, Nuget packages).
In the context of the Plugin Framework, **plugin is a single .NET Type**. What makes a plugin? As described previously, it depends on the host application. For some applications a plugin is a type which implements a specific interface. In some applications a plugin is a type which has a single public method called Run. Attributes are often used to indicate the plugins and that is also supported by Plugin Framework. From the Plugin Framework's point of view anything or everything can be a plugin.
As mentioned, in Plugin Framework a single plugin is a .NET Type. Even though Plugin Framework's ASP.NET Core support makes it easy to instantiate and use plugins in services and controllers through dependency injection (IServiceProvider), Plugin Framework itself doesn't provide any built-in mechanisms for creating instances (objects) from the plugins (types). In some cases Activator.CreateInstance is all that is needed and in some cases it is best to hook Plugin Framework with the app's DI-system. The requirements are host application specific.
In Plugin Framework, each Plugin is composed of the following information:
* Type
* Plugin name
* Plugin version
### Plugin Catalogs
Plugin Framework contains a concept called "Catalog". A single assembly can be a catalog. A .NET type can be a catalog. Folders with dlls are often used as catalogs and Plugin Framework also supports Nuget packages, Nuget feeds and Roslyn scripts as Plugin catalogs. Multiple catalogs are often combined into a single Composite catalog.
Each catalog contains 0-n plugins.
Plugin Framework provides the following officially supported catalogs:
* Type
* Assembly
* Folder
* Delegate (Action or a Func) ([Documentation](https://github.com/weikio/PluginFramework/wiki/Delegate-Plugin-Catalog))
* Roslyn script ([Nuget: Weikio.PluginFramework.Catalogs.Roslyn](https://www.nuget.org/packages/Weikio.PluginFramework.Catalogs.Roslyn/), [Documentation](https://github.com/weikio/PluginFramework/wiki/Roslyn-Plugin-Catalog))
* Nuget package ([Nuget: Weikio.PluginFramework.Catalogs.Nuget](https://www.nuget.org/packages/Weikio.PluginFramework.Catalogs.Nuget/))
* Nuget feed ([Nuget: Weikio.PluginFramework.Catalogs.Nuget](https://www.nuget.org/packages/Weikio.PluginFramework.Catalogs.Nuget/))
## Source code
Source code for Plugin Framework is available from [GitHub](https://github.com/weikio/PluginFramework).
## Support & Build by
Plugin Framework is build by [Adafy](https://adafy.com). Adafy also provides commercial support for the framework.

Adafy is a Finnish software development house, focusing on Microsoft technologies.
## Constributors
Thanks to the following contributors who have helped with the project:
#### [@panoukos41](https://github.com/panoukos41)
## License
Plugin Framework is available as an open source, MIT-licensed project.
================================================
FILE: THIRD-PARTY-NOTICES.txt
================================================
Plugin Framework uses third-party libraries or other resources that may be
distributed under licenses different than the Plugin Framework software.
In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:
info@weik.io
License notice for Minver
------------------------------------
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
License notice for ASP.NET Core
------------------------------------
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: global.json
================================================
{
"sdk": {
"version": "6.0.420"
}
}
================================================
FILE: samples/BlazorApp/App.razor
================================================
Sorry, there's nothing at this address.
================================================
FILE: samples/BlazorApp/BlazorApp.csproj
================================================
netcoreapp3.1Never
================================================
FILE: samples/BlazorApp/Data/WeatherForecast.cs
================================================
using System;
namespace BlazorApp.Data
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int) (TemperatureC / 0.5556);
public string Summary { get; set; }
}
}
================================================
FILE: samples/BlazorApp/Data/WeatherForecastService.cs
================================================
using System;
using System.Linq;
using System.Threading.Tasks;
namespace BlazorApp.Data
{
public class WeatherForecastService
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
public Task GetForecastAsync(DateTime startDate)
{
var rng = new Random();
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index), TemperatureC = rng.Next(-20, 55), Summary = Summaries[rng.Next(Summaries.Length)]
}).ToArray());
}
}
}
================================================
FILE: samples/BlazorApp/Pages/Counter.razor
================================================
@page "/counter"
@implements Weikio.PluginFramework.Samples.Shared.IWidget
Current count: @currentCount
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
public string Title
{
get { return "Counter Widget"; }
}
}
================================================
FILE: samples/BlazorApp/Pages/Error.razor
================================================
@page "/error"
Error.
An error occurred while processing your request.
Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.
The Development environment shouldn't be enabled for deployed applications.
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
and restarting the app.
An error has occurred. This application may no longer respond until reloaded.
An unhandled exception has occurred. See browser dev tools for details.
Reload🗙
================================================
FILE: samples/BlazorApp/Program.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace BlazorApp
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup();
});
}
}
================================================
FILE: samples/BlazorApp/Shared/MainLayout.razor
================================================
@inherits LayoutComponentBase
Please take our
brief survey
and tell us what you think.
@code {
public string Title { get; } = "Surveys";
}
================================================
FILE: samples/BlazorApp/Startup.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using BlazorApp.Data;
using Microsoft.CodeAnalysis;
using Weikio.PluginFramework.Samples.Shared;
namespace BlazorApp
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton();
services.AddPluginFramework();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
}
}
}
================================================
FILE: samples/BlazorApp/_Imports.razor
================================================
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.JSInterop
@using BlazorApp
@using BlazorApp.Shared
================================================
FILE: samples/BlazorApp/appsettings.Development.json
================================================
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
================================================
FILE: samples/BlazorApp/appsettings.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
================================================
FILE: samples/BlazorApp/wwwroot/css/open-iconic/FONT-LICENSE
================================================
SIL OPEN FONT LICENSE Version 1.1
Copyright (c) 2014 Waybury
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
================================================
FILE: samples/BlazorApp/wwwroot/css/open-iconic/ICON-LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2014 Waybury
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: samples/BlazorApp/wwwroot/css/open-iconic/README.md
================================================
[Open Iconic v1.1.1](http://useiconic.com/open)
===========
### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons)
## What's in Open Iconic?
* 223 icons designed to be legible down to 8 pixels
* Super-light SVG files - 61.8 for the entire set
* SVG sprite—the modern replacement for icon fonts
* Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats
* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
* PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px.
## Getting Started
#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections.
### General Usage
#### Using Open Iconic's SVGs
We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute).
```
```
#### Using Open Iconic's SVG Sprite
Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `