Showing preview only (573K chars total). Download the full file or copy to clipboard to get everything.
Repository: sgjsakura/AspNetCore
Branch: master
Commit: e7c4d155af85
Files: 200
Total size: 508.1 KB
Directory structure:
gitextract_s1v18kb7/
├── .gitattributes
├── .gitignore
├── LICENSE.txt
├── PagerDemo.md
├── PagerDemov1.md
├── README.md
├── Sakura.AspNetCore.Extensions/
│ ├── Directory.Build.props
│ ├── Sakura.AspNetCore.AsyncPagedList/
│ │ ├── AsyncCacheable.cs
│ │ ├── AsyncPagedList.cs
│ │ ├── IAsyncPagedList.cs
│ │ ├── PagedListCreationHelper.cs
│ │ ├── Properties/
│ │ │ ├── Annotations.cs
│ │ │ └── AssemblyInfo.cs
│ │ └── Sakura.AspNetCore.AsyncPagedList.csproj
│ ├── Sakura.AspNetCore.Authentication.ExternalCookie/
│ │ ├── ApplicationBuilderExtensions.cs
│ │ ├── ExternalSecurityStampValidator.cs
│ │ ├── ExternalSignInManager.Net1.cs
│ │ ├── ExternalSignInManager.Net2.cs
│ │ ├── ExternalSignInManager.cs
│ │ ├── IdentityHelper.cs
│ │ ├── Sakura.AspNetCore.Authentication.ExternalCookie.csproj
│ │ └── ServiceCollectionExtensions.cs
│ ├── Sakura.AspNetCore.DynamicLocalizer/
│ │ ├── IDynamicHtmlLocalizer.cs
│ │ ├── IDynamicStringLocalizer.cs
│ │ ├── IDynamicViewLocalizer.cs
│ │ ├── Internal/
│ │ │ ├── DynamicHtmlLocalizer.cs
│ │ │ ├── DynamicHtmlLocalizerWrapper.cs
│ │ │ ├── DynamicHtmlTextLocalizerWrapper.cs
│ │ │ ├── DynamicStringLocalizer.cs
│ │ │ ├── DynamicStringLocalizerWrapper.cs
│ │ │ ├── DynamicViewLocalizer.cs
│ │ │ └── IDynamicLocalizerWrapper.cs
│ │ ├── Sakura.AspNetCore.DynamicLocalizer.csproj
│ │ └── ServiceCollectionExtensions.cs
│ ├── Sakura.AspNetCore.Extensions.sln
│ ├── Sakura.AspNetCore.Extensions.sln.DotSettings
│ ├── Sakura.AspNetCore.Localization.Dictionary/
│ │ ├── DictionaryStringLocalizer.cs
│ │ └── Sakura.AspNetCore.Localization.Dictionary.csproj
│ ├── Sakura.AspNetCore.Messages/
│ │ ├── DefaultOperationMessageAccessor.cs
│ │ ├── OperationMessageOptions.cs
│ │ ├── OperationMessageServiceCollectionExtensions.cs
│ │ └── Sakura.AspNetCore.Messages.csproj
│ ├── Sakura.AspNetCore.Messages.Abstractions/
│ │ ├── IOperationMessageAccessor.cs
│ │ ├── OperationMessage.cs
│ │ ├── OperationMessageExtensions.cs
│ │ ├── OperationMessageLevel.cs
│ │ └── Sakura.AspNetCore.Messages.Abstractions.csproj
│ ├── Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/
│ │ ├── ActionResultException.cs
│ │ ├── EnableActionResultExceptionAttribute.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions.csproj
│ │ └── ServiceExtensions.cs
│ ├── Sakura.AspNetCore.Mvc.Messages/
│ │ ├── CssClassBasedIconMapper.cs
│ │ ├── IIconMapper.cs
│ │ ├── IIconToCssClassMapper.cs
│ │ ├── IOperationMessageHtmlGenerator.cs
│ │ ├── IOperationMessageLevelToStyleMapper.cs
│ │ ├── Implementations/
│ │ │ ├── Bootstrap5AlertMessageContentLayout.cs
│ │ │ ├── Bootstrap5AlertMessageHtmlGenerator.cs
│ │ │ ├── Bootstrap5AlertMessageHtmlGeneratorOptions.cs
│ │ │ ├── Bootstrap5MessagesServiceBuilder.cs
│ │ │ ├── Bootstrap5ToastMessageHtmlGenerator.cs
│ │ │ ├── Bootstrap5ToastMessageHtmlGeneratorOptions.cs
│ │ │ ├── BootstrapBuilderExtensions.cs
│ │ │ ├── BootstrapIconCssClassMapperOptions.cs
│ │ │ ├── BootstrapIconMapper.cs
│ │ │ ├── BootstrapIconStyle.cs
│ │ │ ├── DefaultBootstrap5OperationMessageLevelToStyleMapper.cs
│ │ │ ├── DefaultBootstrapIconCssClassMapper.cs
│ │ │ ├── HorizontalAlignment.cs
│ │ │ ├── IBootstrapIconServiceBuilder.cs
│ │ │ ├── Utility.cs
│ │ │ └── VerticalAlignment.cs
│ │ ├── MessageTagHelper.cs
│ │ ├── OperationMessageServiceBuilder.cs
│ │ ├── Sakura.AspNetCore.Mvc.Messages.csproj
│ │ ├── ServiceCollectionExtensions.cs
│ │ └── StaticIIconToCssClassMapper.cs
│ ├── Sakura.AspNetCore.Mvc.PagedList/
│ │ ├── FirstAndLastPagerItemActiveMode.cs
│ │ ├── Generators/
│ │ │ ├── BaseUriLinkGenerator.cs
│ │ │ ├── CustomHtmlContentGenerator.cs
│ │ │ ├── CustomLinkGenerator.cs
│ │ │ ├── CustomQueryStringLinkGenerator.cs
│ │ │ ├── CustomQueryValueLinkGenerator.cs
│ │ │ ├── CustomStringContentGenerator.cs
│ │ │ ├── DisabledLinkGenerator.cs
│ │ │ ├── FormattedLinkGenerator.cs
│ │ │ ├── FormattedQueryValueLinkGenerator.cs
│ │ │ ├── FormattedStringContentGenerator.cs
│ │ │ ├── FragmentLinkGenerator.cs
│ │ │ ├── QueryStringLinkGenerator.cs
│ │ │ ├── QueryValueLinkGenerator.cs
│ │ │ ├── SimpleLinkGenerator.cs
│ │ │ ├── SimpleQueryValueLinkGenerator.cs
│ │ │ ├── SimpleStringContentGenerator.cs
│ │ │ └── StringContentGenerator.cs
│ │ ├── IPagerItemContentGenerator.cs
│ │ ├── IPagerItemLinkGenerator.cs
│ │ ├── Internal/
│ │ │ ├── BootstrapPagerHtmlGenerator.cs
│ │ │ ├── DefaultPagerGenerator.cs
│ │ │ ├── DefaultPagerListGenerator.cs
│ │ │ ├── DefaultPagerRenderingListGenerator.cs
│ │ │ ├── IPagerGenerator.cs
│ │ │ ├── IPagerHtmlGenerator.cs
│ │ │ ├── IPagerListGenerator.cs
│ │ │ ├── IPagerRenderingListGenerator.cs
│ │ │ ├── PagerGenerationContext.cs
│ │ │ ├── PagerItem.cs
│ │ │ ├── PagerItemContentGeneratorConverter.cs
│ │ │ ├── PagerItemLinkGeneratorConverter.cs
│ │ │ ├── PagerItemType.cs
│ │ │ ├── PagerLayoutConverter.cs
│ │ │ ├── PagerList.cs
│ │ │ ├── PagerRenderingItem.cs
│ │ │ ├── PagerRenderingItemState.cs
│ │ │ ├── PagerRenderingList.cs
│ │ │ ├── StringToHtmlContentConverter.cs
│ │ │ └── Utility.cs
│ │ ├── PagerGenerationMode.cs
│ │ ├── PagerItemContentGenerators.cs
│ │ ├── PagerItemGenerationContext.cs
│ │ ├── PagerItemLinkGenerators.cs
│ │ ├── PagerItemMode.cs
│ │ ├── PagerItemOptions.cs
│ │ ├── PagerItemOptionsSet.cs
│ │ ├── PagerLayout.cs
│ │ ├── PagerLayoutElement.cs
│ │ ├── PagerLayouts.cs
│ │ ├── PagerOptions.cs
│ │ ├── PagerOptionsExtensions.cs
│ │ ├── Sakura.AspNetCore.Mvc.PagedList.csproj
│ │ ├── ServiceCollectionExtensions.cs
│ │ ├── SpecialPagerItemInactiveBehavior.cs
│ │ └── TagHelpers/
│ │ ├── AjaxOptions.cs
│ │ ├── AjaxUpdateMode.cs
│ │ ├── PagerTagHelper.cs
│ │ └── TagHelperUtility.cs
│ ├── Sakura.AspNetCore.Mvc.TagHelpers/
│ │ ├── AuthorizeAttributeTagHelper.cs
│ │ ├── AuthorizeTagHelper.cs
│ │ ├── AuthorizeTagHelperBase.cs
│ │ ├── ConditionalClassTagHelper.cs
│ │ ├── DisplayTextTagHelper.cs
│ │ ├── EnumForSelectTagHelper.cs
│ │ ├── EnumOptionValueSource.cs
│ │ ├── EnumSelectTagHelper.cs
│ │ ├── EnumTypeSelectTagHelper.cs
│ │ ├── EnumValueTextHelper.cs
│ │ ├── FlagsEnumInputTagHelper.cs
│ │ ├── FlagsEnumModelBinder.cs
│ │ ├── FlagsEnumModelBinderProvider.cs
│ │ ├── FlagsEnumModelBinderServiceCollectionExtensions.cs
│ │ ├── HtmlGeneratorHelper.cs
│ │ ├── IdFormatTagHelper.cs
│ │ ├── OptionLabelPosition.cs
│ │ ├── PartialViewItemTagHelper.cs
│ │ ├── ReflectionHelper.cs
│ │ ├── ResourceHelper.cs
│ │ ├── Sakura.AspNetCore.Mvc.TagHelpers.csproj
│ │ ├── SelectOptionLabelTagHelper.cs
│ │ ├── SelectValueOptionTagHelper.cs
│ │ ├── SelectValueTagHelper.cs
│ │ ├── TextSource.cs
│ │ └── ViewDataExtensions.cs
│ ├── Sakura.AspNetCore.Mvc.TempDataExtensions/
│ │ ├── EnhancedSessionStateTempDataProvider.cs
│ │ ├── HtmlContentConverter.NetCoreApp3.cs
│ │ ├── HtmlContentConverter.cs
│ │ ├── IObjectSerializer.cs
│ │ ├── JsonObjectSerializer.cs
│ │ ├── Sakura.AspNetCore.Mvc.TempDataExtensions.csproj
│ │ ├── SerializedObjectInfo.cs
│ │ ├── ServiceCollectionExtensions.cs
│ │ ├── TempDataSerializationOptions.cs
│ │ └── TypedJsonTempDataSerializer.cs
│ ├── Sakura.AspNetCore.Mvc.VisualStyles/
│ │ ├── Sakura.AspNetCore.Mvc.VisualStyles.csproj
│ │ ├── VisualStyle.cs
│ │ ├── VisualStyleMatchResult.cs
│ │ ├── VisualStyleMatchType.cs
│ │ ├── VisualStyleOptions.cs
│ │ └── VisualStyleService.cs
│ ├── Sakura.AspNetCore.PagedList/
│ │ ├── CacheMode.cs
│ │ ├── Cacheable.cs
│ │ ├── DisableAutoRefreshController.cs
│ │ ├── DynamicPagedList.cs
│ │ ├── DynamicPagedListBase.cs
│ │ ├── DynamicPagedListCacheOptions.cs
│ │ ├── DynamicQueryablePagedList.cs
│ │ ├── ICacheControl.cs
│ │ ├── PagedList.cs
│ │ ├── PagedListCreationHelper.cs
│ │ └── Sakura.AspNetCore.PagedList.csproj
│ ├── Sakura.AspNetCore.PagedList.Abstractions/
│ │ ├── DynamicPagedListExtensions.cs
│ │ ├── IDynamicPagedList.cs
│ │ ├── IPagedList.cs
│ │ ├── PagedListExtensions.cs
│ │ └── Sakura.AspNetCore.PagedList.Abstractions.csproj
│ ├── Sakura.AspNetCore.PagedList.Async/
│ │ ├── AsyncPagedListCreationHelper.cs
│ │ └── Sakura.AspNetCore.PagedList.Async.csproj
│ └── Sakura.EntityFrameworkCore.FromSqlExtensions/
│ ├── DbContextFromSqlExtensions.cs
│ └── Sakura.EntityFrameworkCore.FromSqlExtensions.csproj
└── TagHelperDemo.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# 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/
[Xx]64/
[Xx]86/
[Bb]uild/
bld/
[Bb]in/
[Oo]bj/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# 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
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.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
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# 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
# 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
# TODO: Un-comment the next line if you do not want to checkin
# your web deploy settings because they may include unencrypted
# passwords
#*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Microsoft Azure ApplicationInsights config file
ApplicationInsights.config
# Windows Store app package directory
AppPackages/
BundleArtifacts/
# 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/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# 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
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# LightSwitch generated files
GeneratedArtifacts/
ModelManifest.xml
# Paket dependency manager
.paket/paket.exe
# FAKE - F# Make
.fake/
================================================
FILE: LICENSE.txt
================================================
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: PagerDemo.md
================================================
# ASP.NET Core Data Paging and Pager Usage Guide
*Note: here is the guide of version 2. For the version 1 guide, please click [here](PagerDemov1.md).*
This page will give you a step-by-step guide to use ASP.NET Core MVC Data Paging and Pager features. This guide includes the following topics:
- How to paging your data source
- How to enumerate your data page and get paging information
- How to show a pager in your ASP.NET Core MVC Web Page
The following packages are required for this guide:
- `Sakura.AspNetCore.PagedList`: for data paging
- `Sakura.AspNetCore.PagedList.Async`: for async data paging
- `Sakura.AspNetCore.Mvc.PagedList`: for HTML pager generation
## Data Paging
Before using the ASP.NET Core MVC Pager, usually you may want to paging your data source (which may come from a EntityFramework or memory query) first. The `Sakura.AspNetCore.PagedList` package provides a interface named `IPagedList` to represent as a paged data source. The easiest way to create an instance of it is to use the extension methods defined in `Sakura.AspNetCore.PagedListCreationHelper` class. The following code shows the basic usage:
```C#
// Import extension methods in PagedListCreationHelper class.
using Sakura.AspNetCore;
var pageNumber = 1; // Note that page number starts from 1 (not zero!)
var pageSize = 10;
// data is assumed as coming from an EntityFramework DbSet here. Any object with type IEnumerable<T> or IQueryable<T> is supported with different implementations.
var data = from i in SportsManageModel.Players select i;
// The created IPagedList object, which contains a partial view for the current page, and the paging information.
var pagedData = data.ToPagedList(pageSize, pageNumber);
```
**Note:** actually, the content of `IEnumerable<T>` or `IQueryable<T>` may vary if they represent as a unstable source (e.g. the result a query from a database may change when another thread added new data). However, the the `ToPagedList` method always creates a static snapshot from the source at the creation time, which means the all the information of the `IPagedList` (including the total page count and the content of current page) never changes after you created it. If you want to capture a dynamic reference of the source, please see the next section.
### Dynamic Data Paging
For advanced scenes, you may try to track the change of the data source. Under such circumstance, you may use `IDynamicPagedList`. Another additional feature of this interface is you can change paging settings (page size and page index) even after you created it and receive data in new page. In order to use create a dynamic paged list, you may use `ToDynamicPagedList` extension method on either `IEnumerable<T>` or `IQueryable<T>` object.
### Async Data Paging
Entity Framework provides some extention method to quey data asynchronously (e.g. `ToArrayAsync`). If you would like to take advantage for these async operations, you may add the `Sakura.AspNetCore.PagedList.Async` package into your project, and use `ToPagedListAsync` method to generate `IPagedList` asynchronously.
**Note:** it is similar with the `ToPageList` method that the async method also creates snapshot for data source. Async operation on dynamic paged lists is currently not supported, since there is no way to set a property value asynchronously.
## Paged Data Access
In MVC Projects, you may pass the paged data source from your controller into your view, and iterates the current pages easily. The following code shows the basic way:
```C#
// In MVC Controller
public IActionResult MyDataView()
{
// Code for data source access is omitted here.
var pagedData = data.ToPagedList(pageSize, pageNumber);
return View(pagedData);
}
```
```C#
// In MVC View
@model Sakura.AspNetCore.IPagedList<Player>
@* The TotalCount property of a IPagedList is used to indicate the count of all (non-paged) items. *@
<span>Total Players: @Model.TotalCount </span>
<ul>
@* Note: IPagedList implements the enumration for current page. (data not in current page will not be accessed.) *@
@foreach (var i in Model)
{
<li>@i.Name</li>
}
</ul>
```
*Note: Actually, the `IPagedList` is not related with the MVC platform, which means it can be used in any .NET Core Platform targeted project (Including ASP.NET Core Class Library and ASP.NET Core Web Application).*
## Pager
Pager feature is much more complex, since it is related with data handling, HTML generation, and MVC view code writing. The detailed step-by-step configuration is list as following.
### Simple Usage
First of all, you need to install the package for MVC pager, you should add the package `Sakura.AspNetCore.Mvc.PagedList` into your `project.json`.
And then, for the most simple usage, you may add the following code into your `Startup.cs` file:
```C#
// Add the following line at the top area of the file to import extension methods.
using Sakura.AspNetCore.Mvc;
public void ConfigureServices(IServiceCollection services)
{
// .. Other configuration codes in you application
// Add default bootstrap-styled pager implementation
services.AddBootstrapPagerGenerator(options =>
{
// Use default pager options.
options.ConfigureDefault();
});
}
```
Next, you should add the `PagerTagHelper` into your view processing pipeline, you may add a new line in the `_ViewImports.cs` like:
```HTML
@addTagHelper *, Sakura.AspNetCore.Mvc.PagedList
```
Note the above line will enabled the `<pager>` tag for all view pages. If you want to enable it only in a few views, you may add this line to each view file invididually.
Finally, in your MVC View (.cshtml) file, use the following code to display a pager.
```HTML
<!-- The "source" attribute must be a C# expression with return type of `IPagedList` (no "@" perfix is needed) -->
<pager source="youDataModel" />
```
**Note: The `<pager>` tag must use the self-closing mode. Adding any content to this tag is not supported.**
If the model type of your view is just `IPagedList` or any inheritted type, you can even omit the "source" attribute and show a pager like this:
```HTML
<pager />
```
### Pager without Source
In most cases, your pager source is a value with type of `IPagedList`. The usage of the pager source is shown as above. However sometimes you may want to generate a pager with out a paged list source. In this case, you can use the `current-page` and `total-page` attribute on the tag to generate a static pager as following:
```HTML
<pager current-page="3" total-page="10" />
```
The above code will generate a pager with 10 pages, and the 3rd page will be current page and displays in an active style.
**Note: You must set both `current-page` and `total-page` attribute to generate a static pager. In addition, these 2 attribute cannot be used together with the `source` attribute, otherwise you will receive an error message during the pager generating.**
###
### Generation Result and Partial Generation
The default bootstrap style pager generator will generate a `<ul class="pagination">` HTML element, and each pager item will be an `<li>` element inside it. According to the state of the page, there will be an `<a>` element (for most of pages) or an `<span>` element (for active page or any page without an effective link) as the content of the `<li>` element.
The original `<pager>` element will be removed from the final HTML page.
In some cases, you may want to use your own container for your pager, or add some custom items in the list. In this cases, You may change the generation mode of the pager to `PagerGenerationMode.ListOnly`. On this mode, only `<li>` elements for each pager items will be generated, a examples may be following:
```HTML
<!-- You must provide a container manually -->
<ul class="pagination">
<li>My Custom Item</li>
<pager generation-mode="ListOnly" />
<li>Another Custom Item</li>
</ul>
```
### PagerOptions Configuration
To customize the pager genreation, the most effective way is change the options for the pager. The options are designed as a type named `PagerOptions`, and you can set a custom options to your pager using the `options` attribute like below (the detailed description for options settings will be introduced later in this page):
```HTML
<!-- the `myOptions` must be a C# expression with return type of PagerOptions, no "@" perfix is needed. -->
<pager options="myOptions" />
```
#### `PagerOptions` Settings Description
There are many settings you can control in the `PagerOptions` class, a brief inroduction for these settings are listed below:
Setting|Description|Typical Usage
-------|-----------|-------------
`ExpandPageItemsForCurrentPage`|How many pages arround the current page (in both side) will be displayed. Set to 1 means one extra page for both left and right side will be generated. Set to 0 will display no extra pages (the current page is always displayed).|2
`PagerItemsForEndings`|How many pages at the ending will be displayed. Set to 1 means only the 1st first and last page will be displayed. Set to 0 will disable this feature.|3
`Layout`|The layout of the pager controls the element(s) will be displayed in the pager and their display order. For more information, please see the documentation of `PagerLayoutElement` class.|`PagerLayouts.Default`, `PargerLayouts.Custom()`
`IsReversed`|If true, all pager items (including number items and special buttons) will be reversed. |*N/A*
`HideOnSinglePage`|If true, the pager will supress all output when the pager source only has one page.|*N/A*
`ItemOptions`|Controls the content and link generation for different types of pager items.|*See below*
`AdditionalSettings`|Provide additional settings used for 3rd and expaned handlers.|An example can be found in `Enabling Ajax` section
In the `PagerOptions.ItemOptions` property, there are series of different individual properties to control the different pager element, each of them is an instance of `PagerItemOptions` class. The list of all items are as below:
Item|Usage|Base Item
----|-----|---------
`Default`|Shared settings for all pager items|*None*
`Normal`|Settings for all numbered pager links|`Default`
`Active`|Settings for current active (highlighted) page|`Normal`
`Omitted`|Settings for omitted page placehoders|`Default`
`FirstPageButton`|Settings for invidiual "Go to first page" button|`Default`
`LastPageButton`|Settings for invidiual "Go to last page" button|`Default`
`PreviousPageButton`|Settings for invidiual "Go to previous page" button|`Default`
`NextPageButton`|Settings for invidiual "Go to next page" button|`Default`
In the above table, `Base Item` means the setting will be generated will the specified base item. e.g. The lost settings in `Active` mode will be merged with values in `Normal` mode, and then merged again with `Default` mode. It means you do not need to rewrite the settings which are same as the base item.
The settings in the `PagerItemOptions` are described as below:
Setting|Description|Typical Usage
-------|-----------|-------------
`Content`|A content generator used to generate the content of each pager item|`PagerItemContentGenerators.XXX`
`Link`|A link generator used to generate the link of each pager item, if the generator returns a null string, the pager will has no link effect|`PagerItemLinkGenerators.XXX`
`InactiveBehavior`|How to handle the pager item if its current state is not meanful (e.g. the state of "go to next page" button when you are already in the last page), this setting only affects "go to first/last/next/previous page button"|*Please see documentation*
`ActiveMode`|How to determine if the current pager item is meanful (for further handling of `InactiveBehavior` setting), this setting only affect "go to first/last page button"|*Please see documentation*
#### Configure Default Options using Setup Actions
You do not need to set `options` attribute for each pager; You can set a default options at application startup time. The ASP.NET Core framework has provide the `Configure` extension method to save a application-level options value, you may use code like bellow to set the default `PagerOptions`:
```C#
public void ConfigureServices(IServiceCollection services)
{
// .. Other configuration codes in you application
services.Configure<PagerOptions>(options =>
{
// This following line is an example to set an option value
options.PagerLinksForEnding = 2;
});
}
```
You may also to to use the setup delegate in the `AddBootstrapPagerGenerator` method (see the example in the `Simple Usage` section), it is a shortcut manner with the same effect as `Configure` method.
#### Configure Options using Config File
ASP.NET Core application provide the ability to load configuration from setting files (usually named as `appsettings.json`). This pager framework also supports set most of the options in the settings file, a example is shown as below:
In `appsettings.json`:
```JSON
{
"Pager": {
"ExpandPageItemsForCurrentPage" : 2,
"PageItemsForEnding": 3,
"Layout": "Default",
"AdditionalSettings": {
"my-setting-one": "1"
},
"ItemOptions": {
"Default": {
"Content": "TextFormat:{0}",
"Link": "QueryName:page",
"InactiveBehavior": "Hide",
"ActiveMode": "Always"
},
"GoToLastPage": {
"Content": "Text:Go To Last Page"
}
}
}
}
```
In `Startup.cs`:
```C#
// You need to the "Microsoft.Extensions.Options.ConfigurationExtensions" package, which is pre-loaded in ASP.NET Core RTM.
public void ConfigureServices(IServiceCollection services)
{
// .. Other configuration codes in you application
// Loading the "pager" section in the config file and set as the default pager options.
services.Configure<PagerOptions>(Configuration.GetSection("Pager"));
}
```
The ASP.NET Core framework can mapp JSON key and values into strong typed propreteis of all simple types (int, string, etc.), enums, and `Dictionary<string,string>` automatically. However, the `PagerOptions.Layout`, `PagerItemOptions.Content` and `PagerItemOptions.Link` are complex types, thus the package provides different converters to convert string based values into actual implementations, the supported configuration string a listed below (allow constant string in `Format` column is case insensitive):
##### For `PagerOptions.Layout`
Format|Description|Example
------|-----------|-------
`Default`|Use default layout setting, please see `PagerLayouts.Default`|*N/A*
`Custom:{items}`|Use a custom layout, `{items}` is a comma `,` splitted string, in which each term is one enum item of `PagerLayoutElement`(case insensitive)|`Custom:GoToFirstPageButton,Items`: The pager will contains a standalone "go to first page" button and a list of pages, no other buttons will be displayed.
##### For `PagerItemOptions.Content`
Format|Description|Example
------|-----------|-------
`Text:{text}`|Use a fixed text as item content, string will be HTML-encoded before write to page.|`Text:Go to First` will display string "Go to First" in the button
`Html:{html}`|Use a fixed text as item content, string will **NOT** be HTML-encoded before write to page.|`Html:‹` will display a single left quote mark ("<") in the button
`TextFormat:{format}`|Use a format string as item content, the placeholder `{0}` will be the page number.string will be HTML-encoded before write to page.|`TextFormat:Page {0:d}` will display `Page 3` for the 3rd page
`HtmlFormat:{format}`|Same as above, but the content will **NOT** be HTML-encoded.|*N/A*
`Default`|Use the default settings which display the page number only (equivelent to `Text:{0:d}`)|*N/A*
*Note: There are many other generators in `PagerItemContentGenerators` and `PagerItemLinkGenerators` class, however, many of them cannot be describe and created from a string configuration. In order to use them, you must craete them in your code.*
##### For `PagerItemOptions.Link`
Format|Description|Example
------|-----------|-------
`Query:{name}={format}`|Add a query parameter with a fixed name and a formatted query parameter value as link.|`Query:page={0:d}` will generate append(or replace) a query parameter `page=3` of the 3rd page on the current URL
`QueryName:{name}`|Add a query parameter with a fixed name, the value of the parameter will be the page number.|`QueryName:page` will generate append(or replace) a query parameter `page=3` of the 3rd page on the current URL
`Default`|Use the default setting (equivelent to `QueryName:page`)|*N/A*
`Format`|Use a format string as item link, the placeholder `{0}` will be the page number.|`Format:/Index?page={0:d}` will generate a link `/Index?page=3` for the 3rd page
`Fixed`|Use a fixed string as item link.|`Fixed:/Index/Home` will generate a link `/Index/Home` for the pager item
`Disabled`|Generate a null string as link, which will cause the button non clickable|*N/A*
#### Additional Settings
Both `PagerOptions` and `PagerItemOptions` contains a property named `AdditioanlSettings`. This settings are automatically inheritted, which means the settings is the `PagerOptions` will be merged into each `PagerItemOptions` at runtime, and the different types of `PagerItemOptions` will also be merged as the same behavior for other properties described above.
This settings are not used in `PagerTagHelper` itself, however, the generators may use them for extra customization. In the next section you will see how the default `BootstrapPagerHtmlGenerator` use it for customize element generation.
#### Shortcut Settings
Creating a `PagerOptions` at each time is boring. In order to shorten the developement time, the `<pager>` tag provide several shortcut attribute in order to partial customize the options. Currently the available attributes are:
Name|Description
----|-----------
`item-default-content`|The default content generator. It refers `PagerOptions.ItemOptions.Default.Content`
`item-default-link`|The defualt link generator. It refers `PagerOptoins.ItemOptions.Default.Link`
`settings` and `setting-*`|Additional settings for `PagerOptions.` You may use `settings` to set the entire dictionary, or use `setting-*` to set one item. e.g. You can use `setting-mydata="1"` to set item "mydata" with value "1" (Just like the design of MVC `asp-route-*` attributes).
Here's a sample to use shortcut settings:
```HTML
<pager item-default-link='PagerItemLinkGenerators.QueryName("datapage")' />
```
In the above code, the pager will change use a custom link generator instead of the default generator configured globally.
### Generators and Customization
Pagers are complex objects. Its building process consists of many steps, including calculating page numbers, generating button links and contents, and building-up HTML strutures. All these work is done by a service named `IPagerGenrator`. In order to generate a pager, you must register one implementation of this service at application startup time, or specify one in the tag like:
```HTML
<pager generator="yourGenrator" />
```
The default generator is named `DefaultPagerGenrator`, which is included in this package. If you would like to use another generator to get a pager of new style, you may register a new one and replace it.
#### Default Generator and Partial Customization
Here, I would like to provide a brief introduction to the default generator. It uses 3 different sub-services to finally generate the complete pager HTML. These services are:
##### `IPagerListGenerator`
This service is used to generate a logical `PagerList` according to the pager information provided in the tag context. The logical `PagerList` describe the type and page number (if any) of each pager item, and their content and link generation manner. However, the visual information (e.g. the visual state and actual content) is not included. The `DefaultPagerListGenerator` class implements it by default.
##### `IPagerRenderingListGenerator`
This service is used to generate the visual `PagerRenderingList`, in which the visual information for the pager is generated, including its content HTML ,its link address, and visual state. The logical information like page number is no longer accessible. The `DefaultPagerRenderingListGenerator` class implements it by default.
##### `IPagerHtmlGenerator`
This service is used to finally build-up the entire HTML result. Since the `PagerRenderingList` only describe the information for the pager elements, it is still lack of the entire HTML structure, while this service take the responsibility for generating them. This service may take a lot of HTML operations, and the style of the final result is usually very limited by its implementation. If you just want to generate a pager with a different style, you may consider to find a new implementation for this service and register it before the default `BootstrapPagerHtmlGenerator` works.
#### Customization for Default Implementation
The default `BootstrapPagerHtmlGenerator` generate a bootstrap style pager, which includes a `<ul>` container, a series of `<li>` items, and each of them contains an `<a>` or `<span>` element accroding to the pager button's style.
In order to enhance the customization ability for this pager, the `BootstrapPagerHtmlGenerator` is designed to accept the following additional settings:
- Any setting with a name start with `list-attr-` will be append to the root `<ul>` element
- Any setting with a name start with `item-attr-` will be append to the `<li>` element
- Any setting with a name start with `link-attr-` will be append to the `<a>` and `<span>` element
For example, you may use the following code to set the `id` of the generated `<ul>` element as `myPager`:
```HTML
<pager setting-list-attr-id="myPager" />
```
#### Enabling AJAX
AJAX navigation is an common feature for a lots of mordern web applications. It should be pointed out that navigation is not the core business for a pager, but a feature on HTML interaction. Thus, this feature is not provided in the `PagerOptions` level, and you should ask the `IPagerHtmlGenerator` service to support AJAX navigation.
For the default `BootstrapPagerHtmlGenerator`, it is suggested that use the **Microsoft jQuery Unobtrusive Ajax** library as your AJAX support library. This library allows you to add static HTML attributes to control the AJAX behavior, which is highly compatible with this package. For example, a simple way to just enable AJAX nagivation is like:
```HTML
<pager setting-link-attr-data-ajax="true" />
```
The above code will generate all `<a>` element with a setting of `data-ajax="true"`, which can enable the AJAX navigation for links. For more detailed information about AJAX behaviour controlling, please read the offical documentation of **Microsoft jQuery Unobtrusive Ajax** library.
#### Bootstrap Version Compatibility Notes
Bootstrap V4 has changed the HTML class requirement for pagination elements, which requires `page-item` and `page-link` classes must be explicitly specified on the `<li>` and `<a>`(or `<span>`) element in the pager. Since the package version 2.0.11 of `Sakura.AspNetCore.Mvc.PagedList`, the default `BootstrapPagerHtmlGenerator` will automatically adds these classes on all related pager elements. This behaviour usually does not make downside effects on pages using Boostrap version 3 since these classes are not defined in the Version 3 CSS files, and thus no actual UI effect will be raised. However, if these classes are defined in your web site's style files and they DO affect your pager appearance, you may use the following setting to disable these behaviour:
```HTML
<pager setting-disable-bootstrap-v4-class="true" />
```
### Future Works and Contribution
The author is planned to add the following new features:
- [ ] Hash (Fragment) based URL generators
- [ ] `FormatProvider` controlling for generators
- [x] `IsReversed` property for `PagerOptions`
- [ ] Extenders for pager generators
Anyone who want to help improve the library is very welcome~
================================================
FILE: PagerDemov1.md
================================================
# ASP.NET 5 Data Paging and Pager Usage Guide
*NOTE: This is a documenation old version, we recommend you to use version newest of `Sakura.AspNetCore.Mvc.PagedList` package. The documentation for the newest package can be found [here](PagerDemo.md).*
This page will give you a step-by-step guide to use ASP.NET 5 MVC6 Data Paging and Pager features. This guide includes the following topics:
- How to paging your data source
- How to enumerate your data page and get paging information
- How to show a pager in your MVC6 Web Page
## Data Paging
To use MVC6 Pager, you must first paging your data source (which may come from a EntityFramework or memory query) into an `IPagedList` instance. The easiest way to create it is using the extension methods defined in `Sakura.AspNet.PagedListCreationHelper` class. The following code shows the basic way to use them:
```C#
// Import extension methods in PagedListCreationHelper class.
using Sakura.AspNet;
var pageNumber = 1; // Note that page number starts from 1 (not zero!)
var pageSize = 10;
// data is assumed as coming from an EntityFramework DbSet here. All data source with IEnumerable<T> and IQueryable<T> are both supported with different implementations.
var data = from i in SportsManageModel.Players select i;
// The IPagedList type, which contains a partial view for the current page, and the paging information.
var pagedData = data.ToPagedList(pageSize, pageNumber);
```
## Paged Data Access
In MVC Projects, you may pass the paged data source from your controller into your view, and iterates the current pages easily. The following code shows the basic way:
```C#
// In MVC Controller
public IActionResult MyDataView()
{
// Code for data source access is omitted here.
var pagedData = data.ToPagedList(pageSize, pageNumber);
return View(pagedData);
}
```
```C#
// In MVC View
@model Sakura.AspNet.IPagedList<Player>
@* The TotalCount property of a IPagedList is used to indicate the count of all (non-paged) items. *@
<span>Total Players: @Model.TotalCount </span>
<ul>
@* Note: IPagedList implements the enumration for current page. (data not in current page will not be accessed.) *@
@foreach (var i in Model)
{
<li>@i.Name</li>
}
</ul>
```
*Note: Actually, the `IPagedList` is not related with the MVC platform, which means it can be used in any .NET Core Platform targeted project (Including ASP.NET Class Library and ASP.NET Web Application).*
## Pager
Pager feature is much more complex, since it is related with data handling, HTML generation, and MVC view code writing. The detailed step-by-step configuration is list as following.
### Pager Configuration
Before you use pager feature, you must first configure pager options. Pager options is represented using `Sakura.AspNet.Mvc.PagerOptions` class, which controls the behavior for pager generation. A simple pager options defination may created as below:
```C#
using Sakura.AspNet.Mvc;
var pagerOptions = new PagerOptions
{
ExpandPageLinksForCurrentPage = 2, // Will display more 2 pager buttons before and after current page.
PageLinksForEndings = 2, // Will display 2 pager buttons for first and last pages.
Layout = PagedListPagerLayouts.Default, // Layout controls which elements will be displayed in the pager. For more information, please read the documentation.
// Options for all pager items.
Items = new PagerItemOptions
{
TextFormat = "{0}", // The format for the pager button text, here means the content is just the actual page number. This property is used with string.Format method.
LinkParameterName = "page", // This property measn the generated pager button url will append the "page={pageNumber}" to the current URL.
},
// Configure for "go to next" button
NextButton = new SpecialPagerItemOptions
{
Text = "Next",
InactiveBehavior = SpecialPagerItemInactiveBehavior.Disable, // When there is no next page, disable this button
LinkParameterName = "page"
},
// Configure for "go to previous" button
PreviousButton = new SpecialPagerItemOptions
{
Text = "Previous",
InactiveBehavior = SpecialPagerItemInactiveBehavior.Disable, // When there is no next page, disable this button
LinkParameterName = "page"
},
// Configure for "go to first page" button
FirstButton = new FirstAndLastPagerItemOptions
{
Text = "First",
ActiveMode = FirstAndLastPagerItemActiveMode.Always,
InactiveBehavior = SpecialPagerItemInactiveBehavior.Disable,
LinkParameterName = "page",
},
// Configure for "go to last page" button
LastButton = new FirstAndLastPagerItemOptions
{
Text = "Last",
ActiveMode = FirstAndLastPagerItemActiveMode.Always,
InactiveBehavior = SpecialPagerItemInactiveBehavior.Disable,
LinkParameterName = "page",
},
// Configure for omitted buttons (placeholder button when there's too many pages)
Omitted = new PagerItemOptions
{
Text = "...",
Link = string.Empty // disable link
},
}
```
### Pager Generation Service
Next, you also must have an `IPagerHtmlGenerator` service registered in your ASP.NET 5 application. The easiest way is using the default implementation using bootstrap theme. You can active this service in the `ConfigureServices` method in your ASP.NET 5 Startup class as below:
```C#
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// other service configuration of your application
services.UseBootstrapPagerGenerator();
}
}
```
If you uses different theme or frontend framework in your project, you may implement your own `IPagerHtmlGenerator` for custom UI.
### Pager Tag-Helper Directive
After all these above steps, now you are ready to show a pager in your rozar page. First, you must add tag helpers for pager directive, in `_ViewImports.cs`, add the folloing line:
```Rozar
@addTagHelper "*, Sakura.AspNet.Mvc.PagedList"
```
Then, you can enable pager UI for any <nav> element in your HTML page. The method is very simple as:
```HTML
<nav asp-pager-source="myPagedList" asp-pager-options="myPagerOptions" ></nav>
```
In the above example, `myPagedList` are an `IPagedList` object which represent the paged data, and `myPagerOptions` are your pager options (no @ perfix is needed because the value of both attribute are defined as C# object). You can define the pager options anywhere before this directive. In most cases, your paged data is just the model of your view, thus your can change the above code as:
```HTML
<nav asp-pager-source="Model" asp-pager-options="myPagerOptions" ></nav>
```
If you want to use an unified pager option for all of your pages, you can configure the default pager options in `UseBootstrapPagerGenerator` method like:
```C#
services.UseBootstrapPagerGenerator(pagerOptions =>
{
pagerOptions.Items = new PagerItemOptions { /* ... */ };
// ...
});
```
Then you can omit the `asp-pager-options` attribute, and your final code may be
```HTML
<nav asp-pager-source="Model"></nav>
```
-------------------
# FAQ
- *Is there any build-in AJAX support for this library?*
Unfortunately there is no build-in AJAX support in the current version. You may use JQuery scripts to enable AJAX nagivation for linkes, a sample may be:
```Javascript
$(document).ready(function(){
// Add the 'data-ajax' attribute to all anchor in the pager
$('#your-pager-id').find('a').attr('data-ajax', 'true');
});
```
The author a designing a new version of this library, and in the new version AJAX support will be added as an build-in feature.
================================================
FILE: README.md
================================================
# ASP.NET Core Utility
This solution add some useful features for ASP.NET Core projects. All projects in this solution are designed for cross-platform "netstandard" and triditional .NET Full "net" frameworks.
This solution contains the following aspects:
* Tag Helpers
* Middlewares
* Utilities
---
## Current Project List
This section lists all projects in the repo. The list will always update in time.
### External Cookie Services
*Nuget Package Name: `Sakura.AspNetCore.Authentication.ExternalCookie`*
ASP.NET Core Identity Service (`Microsoft.AspNet.Identity` package) already added support for external cookie services, which is required for 3rd application authentication scheme (e.g. Microsoft of Fackbook account). You may use `AddIdentity` and `UseIdentity` method to enable external cookie services. However, in sometimes you may wish to enable external services indivindually without full ASP.NET Identity Service enabled. This project seperates the external cookie services from ASP.NET Identity Services, and may be used in more complex authentication scenes.
The major feature of this project contains:
* Configure ASP.NET Core Application to support ApplicationCookie and ExternalCookie services (provides extension methods can be used in `ConfigureServices` method of ASP.NET Startup class)
* Provide ExternalSignInManager service to simpify external cookie ticket management.
### ASP.NET Core MVC TagHelper Extension Library
*Nuget Package Name: `Sakura.AspNetCore.Mvc.TagHelpers`*
Provide new tag helpers in order to simplify MVC code writing. For more details, please visit the [Tag Helper Demo](TagHelperDemo.md) page.
### ASP.NET TempData Extension Package
*Nuget Package Name: `Sakura.AspNetCore.Mvc.TempDataExtensions`*
This project provides the `EnhancedSessionStateTempDataProvider` service provider, with can replace the original `SessionBasedTempDataProvider`, in order to enhance the type compatibility for session data. The original TempData provider can only work with primitive types, arrays, and one-level plain-objects, objects with complex properties are not supported. The `EnhancedSessionStateTempDataProvider` can successfully work with most data objects with arbitray level structures.
Internally, it uses certain serializer techinque to convert complex data into string value, and store it together with its type full name. When application loading its content, it will deserialize the string to recover the object data structure. The default implmementation uses `JsonObjectSerializer`, and you may also replace it with your own implementation if necessary.
### ASP.NET Core MVC Messages Package
*Nuget Package Name: `Sakura.AspNetCore.Mvc.Messages`*
This project add the feature of common operation message response in web applications, as well as tag helpers to simplify message presentations. The detailed features includes:
* `OperationMessage` definitions and different `OperationMessageLevel` enum items.
* `IOperationMessageAccessor` service, which can be inject in both views and controllers to access operation message data.
* `MessageTagHelper` helper class, and you may use `asp-message-list` attribute on `div` element to generate message list UI, with various styles and additional layout options can be specified.
* `IOperationMessageHtmlGenerator` service, wich is used internally for generating message list UI, and default bootstrap style generator are built-in implemented.
*NOTE: To use this package, your `ITempDataProvider` implementation must have the ability to store and load `ICollection<OperationMessage>` instance. Defaultly, the ASP.NET5 `SessionStateTempDataProvider` cannot support data operation of complex objects. You may change into another `ITempDataProvider` implementation, or just use `EnhancedSessionStateTempDataProvider` in the `ASP.NET TempData Extension Package` project.
### ASP.NET Core PagedList Packages
*Nuget Package Name:*
- *`Sakura.AspNetCore.PagedList`*
- *`Sakura.AspNetCore.PagedList.Async`*
- *`Sakura.AspNetCore.Mvc.PagedList`*
The `Sakura.AspNetCore.PagedList` package provides the `IPagedList` core interface to represent as a data page for a large data source. Some extension methods are also provided to generate instance from any `IEnumerable<T>` or `IQueryable<T>` data sources.
The `Sakura.AspNetCore.PagedList.Async` package helpes you to generate `IPagedList` using async extension method (`ToArrayAsync`, etc.) defined in `Microsoft.EntityFrameworkCore` package.
The `Sakura.AspNetCore.Mvc.PagedList` allows you to use `<pager>` tag in your MVC view page to generate a full featured pager structure.
*For detailed usage, please visit the [Demo](PagerDemo.md) page. Notice: this package has been updated to version 2 (the recommended version). For usage of version 1, please visit the [Version 1 Demo](PagerDemov1.md) page.*
### ASP.NET ActionResult Extensions Package
*Nuget Package Name: `Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions`*
In MVC Projects, you need to return a instance of `IActionResult` to finish the action pipeline, this design made it difficult to add common helper functions to make argument or permission checking and then report a specified status code directly to end user. This library allows you to terminate action executing pipeline directly with a specified result through the standard exception handling system.
In order to enable this feature, all you need is adding an `EnableActionResultException` attribute on a controller or action, and then you can throw an `ActionResultException`instance to terminate a action executing pipeline directly and provide the final action result. If you need to enable this feature globally, you can use `EnableActionResultExceptionFilter` extension method on `MvcOptions` parameter when you add the MVC middleware.
### ASP.NET Core MVC Dyanmic Localizer Package
*Nuget Package Name: `Sakura.AspNetCore.DynamicLocalizer`*
ASP.NET Core 1.0 introduced a new localization design model, which allow developers to access localized resources using `IStringLocalizer`, `IHtmlLocalizer` or `IViewLocalizer` service instances. In order to keep compatibilty and reduce the time cost for switching the developing time single language website into production multiple language implementation, ASP.NET Core team suggests developers to use string context itself as the language resource keys. e.g. the following code
```HTML
@ViewLocalizer["Hello World"]
```
while output the key string "hello world" when there's no resource files defined or the resource for current culture is unavialable.
Although this design reduces the time cost of enabling multiple language support, lots of developers may still build the website with multiple language support from the beginning. The above manner may not be optimized for these scenes, since under such circumstance, developers may choose to use identifier-like word as keys for long messages, e.g. the final code in the CSHTML file maybe:
```HTML
@ViewLocalizer["HelloWorldMessage"]
```
However, actually developers may love the following code style much more:
```HTML
@ViewLocalizer.HelloWorldMessage
```
The above code style looks with much more object-oriented code style, and may also take a lot of editing and compiling time benefits such as identifier checking, searching and intellisence. This behaviour is also favorite for old-time .NET Resource Manager based localizaable applications, in which each resources is named with an identifier and the resource file generators will help you to generate classes for resources, and developers may use strong named propreties to access resources.
The `Sakura.AspNetCore.DynamicLocalizer` package now provides a simplified simulation for object-oreinted resource accessing style using .NET dynamic objects. For a simple usage, you may install this package and add the necessary services on startup using the following code:
```C#
public void ConfigureServices(IServiceCollection services)
{
// other service configurations here
// Note: the following base services are necessary and must be also added manually in your startup code
services.AddLocalization();
services.AddMvc().AddViewLocalization();
// add core services used for dynamic localizer
services.AddDynamicLocalizer();
}
```
And now in MVC views, you may using dyanmic object as localization services, the basic usage is shown in the following code:
```HTML
@inject Sakura.AspNetCore.IDynamicViewLocalizer ViewLocalizer
@inject Sakura.AspNetCore.IDynamicHtmlLocalizer<MyResource> MyResourceLocalizer
<p>@ViewLocalizer.Html.WelcomeMessage</p>
<p>@ViewLocalizer.Html.UserNameFormat(ViewBag.UserName)</p>
<p>@MyResourceLocalizer.Html.ImportantTip<Hello>
```
More specifically, the relationship between original localizers and dynamic localizers are shown as bellow:
|Original|Dynamic|
|--------|-------|
|`IViewLocalizer`|`IDyanmicViewLocalizer`|
|`IHtmlLocalizer<T>`|`IDynamicHtmlLocalizer<T>`|
|`IStringLocalizer<T>`|`IDynamicStringLocalizer<T>`|
The following tables showes the supported invocation syntax for dynamic localizers (words in braces are identfier placeholders):
|Syntax|Equivelant Orignal Syntax|Notes|
|------|-------------------------|-----|
|`localizer.Html.{Key}`|`localizer.GetHtml("{Key}")]`|This method is not available in `IStringLocalizer`|
|`localizer.Html.{Key}({Value1}, {Value2})`|`localizer.GetHtml("{Key}", Value1, Value2)]`|This method is not available in `IStringLocalizer`|
|`localizer.Text.{Key}`|`localizer.GetString("{Key}")`|Allowed in all localizers|
|`localizer.Text.{Key}({Value1}, {Value2})`|`localizer.GetString("{Key}", Value1, Value2)]`|Allowed in all localizers|
Note: The behaviour default index-style syntax (e.g. `localizer["Key", Value1, Value2]`) depends on the type of the localizer. For `IViewLocalizer` and `IHtmlLocalizer`, it is equivelant to `GetHtml`, while for `IStringLocalizer`, it's equivelant to `GetString`.
For compatbility reason, the dynamic localizer also support the index style syntax, which will generate the same effect for the new syntax, e.g. `localizer.Html["{Key}", Value1, Value2]` are equivelant to `localizer.Html.Key(Value1, Value2)`.
### ASP.NET Entity Framework Core FromSql Extension Package
*Nuget Package Name: `Sakura.EntityFrameworkCore.FromSqlExtensions`*
In Entity Framework Core 2.1, the concept of the new `QueryType` is introduced, which allows developers to mapping non-table-based query results (e.g. data comes from a database view or a stored procedure) to CLR types. However, in order to use query types, you must first include it in your model. This restriction will cause you to take a lot of unnecessary work when you want to executing a raw SQL statement directly.
More specifically, let's see an example. You want to query some data using a stored procedure named "GetTopStudents" from your database, you know the procedure will produce the top 10 students with highest scores along with their name, and then you may define a query type as well as the following executing codes:
```C#
public class TopStudentInfo
{
public string Name { get; set; }
public int Score { get; set; }
}
// The following code is used to extract the top student infomation.
var result = MyDbContext.Query<TopStudentInfo>().FromSql("EXEC [GetTopStudents]");
```
However, when you try to execute the code above, Entity Framework Core will tell you that the `TopStudentInfo` is not included in the model. In order to fix this exception, you must first include it just like:
```C#
public class StudentDbContext : DbContext
{
public virtual DbQuery<TopStudentInfo> TopStudents { get; set; }
}
```
And then you can get the result using either
```C#
MyDbContext.Query<TopStudentInfo>().FromSql("EXEC [GetTopStudents]")
```
or
```C#
MyDbContext.TopStudents.FromSql("EXEC [GetTopStudents]")
```
The reason why EF requires you to include the query type is to support a chained-query just like `from i in MyDbContext.TopStudents select i`. Under such circumstance, the query type must be included and mapped with either `ToView` or `ToQuery` to declare its original data source. However, if you just want to take usage of the `FromSql` method, the mapping step will be reduntant, but you still need to define the query type in your `DbContext` class.
Considering that you may executing serveral different raw SQL queries or stored procedures in your project. For each of them, you must include the query type into your model individually and this requirement will be a quite boring work. Now the `Sakura.EntityFrameworkCore.FromSqlExtensions` package provides extension methods for including query types and executing raw SQL statements directly, now you may using the following code:
```C#
var result = MyDbContext.FromSql<TopStudents>("EXEC [GetTopStudents]");
```
to get the result without explicitly defining a context-level `DbQuery` instance.
*Note: Internally, this extension method will register the query type into the model globally when you call it if it not exists before, and thus after you call this method sereval times with different types, there will be a huge number of query types added in your model. It may seems to be a side-effect (although adding a new query type actually does not generate performance burden for EF Core), while is problem is caused by the internal design of the EF Core and currently it is not possible to implement query-level type registrations.*
---
## Contribution and Discussion
You are welcome to add issues and advices, if you want to contribute to the project, please fell free to make pull requests.
================================================
FILE: Sakura.AspNetCore.Extensions/Directory.Build.props
================================================
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<WarningLevel>9999</WarningLevel>
</PropertyGroup>
</Project>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/AsyncCacheable.cs
================================================
using System;
using System.Threading.Tasks;
namespace Sakura.AspNetCore
{
/// <summary>
/// Represent as a cachable data.
/// </summary>
/// <typeparam name="T">The type of the data to be caching。</typeparam>
/// <seealso cref="ICacheControl" />
public class AsyncCacheable<T> : ICacheControl
{
/// <summary>
/// Auto refreshing counter used by refreshing control feature.
/// </summary>
private int _AutoRefreshControlCount;
/// <summary>
/// Initialize a new instance using specified information.
/// </summary>
/// <param name="getDataCallback">The callback delegate to obtain the data to be caching.</param>
/// <param name="cacheCallback">
/// A optional callback delegate to generate a cached copy for original data. If this parameter
/// is <c>null</c>, <see cref="DefaultCacheCallback" /> will be used.
/// </param>
/// <param name="cacheMode">
/// The default cache mode of the cache. The default value of this parameter is
/// <see cref="CacheMode.Manual" />.
/// </param>
/// <exception cref="ArgumentNullException"><paramref name="getDataCallback" /> is <c>null</c>.</exception>
public AsyncCacheable(Func<Task<T>> getDataCallback, Func<T, T> cacheCallback = null, CacheMode cacheMode = CacheMode.Manual)
{
if (getDataCallback == null)
{
throw new ArgumentNullException(nameof(getDataCallback));
}
GetDataCallback = getDataCallback;
// Set the caching callback.
CacheCallback = cacheCallback ?? DefaultCacheCallback;
// Set the caching mode.
CacheMode = cacheMode;
// Trigger the first dismiss notification.
NotifyDismiss();
}
/// <summary>
/// Get the callback delegate for generating a cached copy.
/// </summary>
private Func<T, T> CacheCallback { get; }
/// <summary>
/// Get the callback delegate for get the data to be caching.
/// </summary>
private Func<Task<T>> GetDataCallback { get; }
/// <summary>
/// Get the cached data. If no cache is available, the default value of <typeparamref name="T" /> will be returned.
/// </summary>
public T CachedData { get; private set; }
/// <summary>
/// Get a value that indicates whether the cache is available now.
/// </summary>
public bool IsCached { get; private set; }
public async Task<T> GetDataAsync()
{
// Alaways return the cache if available.
if (IsCached)
{
return CachedData;
}
// No caching if caching mode is set to "manual".
if (CacheMode == CacheMode.Manual)
{
return await GetDataDirectlyAsync();
}
// Otherwise, reload the cache and return the result.
await ReloadAsync();
return CachedData;
}
/// <summary>
/// Forcely remove the current cache and reload it.
/// </summary>
public async Task ReloadAsync()
{
CachedData = CacheCallback(await GetDataCallback());
IsCached = true;
}
/// <summary>
/// Generate a cache from the data source. If the data is already cached, this method will do nothing.
/// </summary>
public async Task CacheAsync()
{
if (!IsCached)
{
await ReloadAsync();
}
}
/// <summary>
/// Uncache the current value. This method will make cache dismissed, but will not automatically remove or refresh the
/// cached data
/// </summary>
public Task UncacheAsync()
{
IsCached = false;
return Task.CompletedTask;
}
/// <summary>
/// Get or set the cache mode of the current object.
/// </summary>
public CacheMode CacheMode { get; set; }
/// <summary>
/// The default value for <see cref="CacheCallback" />
/// </summary>
/// <param name="item">The data to be cached.</param>
/// <returns>The cached data.</returns>
/// <remarks>This method will do nothing.</remarks>
private static T DefaultCacheCallback(T item) => item;
/// <summary>
/// Get data directly from the source and ignore any cache.
/// </summary>
/// <returns>The data got directly from the source.</returns>
public Task<T> GetDataDirectlyAsync() => GetDataCallback();
/// <summary>
/// Notify the cached data is dismissed, and reload it if necessary.
/// </summary>
public async Task NotifyDismissAsync()
{
// Make the cache unavailable.
IsCached = false;
// Automatically reload the cache if cache mode is set to "prefetch" and currently caching refresh is enabled.
if (CacheMode == CacheMode.AutoWithPrefetch && _AutoRefreshControlCount == 0)
{
await ReloadAsync();
}
}
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/AsyncPagedList.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Sakura.AspNetCore
{
public class AsyncPagedList<T> : IAsyncEnumerable<T>
{
#region Constructors
/// <summary>
/// Initialize a new instance with specified information.
/// </summary>
/// <param name="source">The data source to be paging.</param>
/// <param name="pageSize">The size of each page.</param>
/// <param name="pageIndex">The index of the current page, start from 1.</param>
/// <param name="cacheOptions">Additional cacheOptions for the paged list.</param>
public AsyncPagedList(IAsyncEnumerable<T> source, int pageSize, int pageIndex = 1,
DynamicPagedListCacheOptions cacheOptions = null)
{
// Exception handling
if (source == null)
{
throw new ArgumentNullException(nameof(source));
}
// Default parameters
var defaultOptions = new DynamicPagedListCacheOptions
{
CurrentPageCacheMode = CacheMode.Manual,
TotalCountCacheMode = CacheMode.Manual
};
// Merge cacheOptions
cacheOptions = cacheOptions ?? defaultOptions;
// Initialize the data source
Source = source;
// Set Paging information
PageSize = pageSize;
PageIndex = pageIndex;
// Caching total count for first time
TotalCountCacheInternal = new AsyncCacheable<Task<int>>(GetTotalCountAsync, cacheMode: cacheOptions.TotalCountCacheMode);
// Caching current page for first time
CurrentPageCacheInternal = new AsyncCacheable<IAsyncEnumerable<T>>(GetCurrentPageAsync, CacheDataAsync, cacheOptions.CurrentPageCacheMode);
// Set initialized flag
IsInitialized = true;
}
#endregion
#region Data Source
/// <summary>
/// Get the original data source.
/// </summary>
public IAsyncEnumerable<T> Source { get; }
#endregion
#region Core Features must be implemented in Derived Classes
/// <summary>
/// When be derived, returns the total count of the data source.
/// </summary>
/// <returns>The total count of the data source.</returns>
protected virtual Task<int> GetTotalCountAsync() => Source.Count();
/// <summary>
/// When be derived, get the elements in the current page.
/// </summary>
/// <returns>The collection of elements in the current page.</returns>
protected virtual IAsyncEnumerable<T> GetCurrentPageAsync()
{
var skipValue = PageSize * (PageIndex - 1);
var takeValue = PageSize;
return Source.Skip(skipValue).Take(takeValue);
}
/// <summary>
/// When be derived, Cache the data page.
/// </summary>
/// <param name="source">The data page to be cached.</param>
/// <returns>The cached copy of <paramref name="source" />.</returns>
protected virtual async Task<IAsyncEnumerable<T>> CacheDataAsync(IAsyncEnumerable<T> source)
{
return (await source.ToArray()).ToAsyncEnumerable();
}
#endregion
#region Data Caching and Controllers
/// <summary>
/// Get the internal caching object for total count.
/// </summary>
private AsyncCacheable<int> TotalCountCacheInternal { get; }
/// <summary>
/// Get the internal caching object for current page.
/// </summary>
private AsyncCacheable<IAsyncEnumerable<T>> CurrentPageCacheInternal { get; }
/// <summary>
/// Get the cache controller for the total count cache.
/// </summary>
public ICacheControl TotalCountCache => TotalCountCacheInternal;
/// <summary>
/// Get the cache controller for the current page cache.
/// </summary>
public ICacheControl CurrentPageCache => CurrentPageCacheInternal;
#endregion
#region Cached Core Data Properties
/// <summary>
/// Get the data in current page.
/// </summary>
public Task<IAsyncEnumerable<T>> CurrentPage => CurrentPageCacheInternal.GetDataAsync();
/// <summary>
/// Get the total count of the data source.
/// </summary>
public Task<int> GetTotalCountAsync() => TotalCountCacheInternal.GetDataAsync();
#endregion
#region Paging Core Features
/// <summary>
/// The current page index.
/// </summary>
private int _PageIndex;
/// <summary>
/// The size of each page.
/// </summary>
private int _PageSize;
/// <summary>
/// Get or set the current page index. The page index is started from 1.
/// </summary>
public int PageIndex
{
get { return _PageIndex; }
set
{
// If initialized, make detailed value check
if (IsInitialized)
{
// Range check
if (value < 1 || value > TotalPage)
{
throw new ArgumentOutOfRangeException(nameof(value), value, "The page index is out of valid range.");
}
if (_PageIndex != value)
{
_PageIndex = value;
// Notify data dismiss
CurrentPageCacheInternal.NotifyDismiss();
}
}
// When initializing, skip the detailed check
else
{
// Basic range check
if (value < 1)
{
throw new ArgumentOutOfRangeException(nameof(value), value, "The page index is out of valid range.");
}
_PageIndex = value;
}
}
}
/// <summary>
/// Get or set the size of each page.
/// </summary>
/// <remarks>
/// Modify this property will reset the <see cref="PageIndex" /> to <c>1</c>. This may raise data refreshing. If you
/// will change <see cref="PageIndex" /> later, please condiser call <see cref="ICacheControl.DisableAutoRefresh" /> on
/// <see cref="CurrentPageCache" /> property in order to improve the performance.
/// </remarks>
public int PageSize
{
get { return _PageSize; }
set
{
if (value <= 0)
{
throw new ArgumentOutOfRangeException(nameof(value), value, "Page size must be positive integer");
}
_PageSize = value;
PageIndex = 1;
}
}
#endregion
#region Additional propreties
/// <summary>
/// Get a value that indicates if the object has been initialized.
/// </summary>
public bool IsInitialized { get; }
/// <summary>
/// Get the total page count of the data source.
/// </summary>
public int TotalPage => (TotalCount - 1) / PageSize + 1;
/// <summary>
/// Get the count of current page.
/// </summary>
public int Count
{
get
{
// Cache property value.
var totalCount = TotalCount;
// Total page
// NOTE: Cannot use propreties since it may cause duplicated computation
var totalPage = (totalCount - 1) / PageSize + 1;
// Only the last page should be calculated.
return PageIndex != totalPage ? PageSize : totalCount - PageSize * (totalPage - 1);
}
}
#endregion
#region Interface Implementations
/// <summary>
/// Get the enumerator for the current object.
/// </summary>
/// <returns>The enumerator for the current object.</returns>
public IAsyncEnumerator<T> GetEnumerator()
{
return CurrentPage.GetEnumerator();
}
/// <summary>
/// Get the data at the specified location in the current page.
/// </summary>
/// <param name="index">The location index in the current page, starting from zero.</param>
/// <returns>The element at the specified location in the current page.</returns>
public Task<T> GetAsync(int index) => CurrentPage.ElementAt(index);
#endregion
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/IAsyncPagedList.cs
================================================
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Sakura.AspNetCore
{
public interface IAsyncPagedList<T> : IAsyncEnumerable<T>
{
Task<int> CountAsync();
Task<int> TotalCountAsync();
int PageSize { get; }
int PageIndex { get; }
Task<T> GetAsync(int index);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/PagedListCreationHelper.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using JetBrains.Annotations;
// ReSharper disable PossibleMultipleEnumeration
namespace Sakura.AspNetCore
{
/// <summary>
/// Provide extension methods for creating <see cref="IPagedList{T}" /> instances. This class is static.
/// </summary>
[PublicAPI]
public static class PagedListCreationHelper
{
/// <summary>
/// Create a snapshot for one page of a <see cref="IAsyncEnumerable{T}" /> object asynchronously.
/// </summary>
/// <typeparam name="T">The element type in the data source.</typeparam>
/// <param name="source">The source <see cref="IEnumerable{T}" /> object to be converting.</param>
/// <param name="pageSize">The size of each page.</param>
/// <param name="pageIndex">The index of the current page. Page index starts from 1.</param>
/// <returns>A <see cref="PagedList{TSource,TElement}" /> object created by paging the <paramref name="source" /> object asynchronously.</returns>
public static async Task<PagedList<IAsyncEnumerable<T>, T>> ToPagedListAsync<T>([NotNull] this IAsyncEnumerable<T> source, int pageSize, int pageIndex = 1)
{
if (source == null)
{
throw new ArgumentNullException(nameof(source));
}
if (pageSize <= 0)
{
throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
}
if (pageIndex <= 0)
{
throw new ArgumentOutOfRangeException(nameof(pageIndex), pageIndex, "The page index must be positive.");
}
var skipValue = pageSize * (pageIndex - 1);
var takeValue = pageSize;
var currentPage = await source.Skip(skipValue).Take(takeValue).ToArray();
var totalCount = await source.Count();
var totalPage = (totalCount - 1) / pageSize + 1;
return new PagedList<IAsyncEnumerable<T>, T>(currentPage, source, pageSize, pageIndex, totalCount, totalPage);
}
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/Properties/Annotations.cs
================================================
/* MIT License
Copyright (c) 2016 JetBrains http://www.jetbrains.com
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. */
using System;
using System.Diagnostics;
#pragma warning disable 1591
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable IntroduceOptionalParameters.Global
// ReSharper disable MemberCanBeProtected.Global
// ReSharper disable InconsistentNaming
// ReSharper disable once CheckNamespace
namespace JetBrains.Annotations
{
/// <summary>
/// Indicates that the value of the marked element could be <c>null</c> sometimes,
/// so the check for <c>null</c> is necessary before its usage.
/// </summary>
/// <example>
/// <code>
/// [CanBeNull] object Test() => null;
///
/// void UseTest() {
/// var p = Test();
/// var s = p.ToString(); // Warning: Possible 'System.NullReferenceException'
/// }
/// </code>
/// </example>
[AttributeUsage(
AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |
AttributeTargets.Delegate | AttributeTargets.Field | AttributeTargets.Event |
AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.GenericParameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class CanBeNullAttribute : Attribute
{
}
/// <summary>
/// Indicates that the value of the marked element could never be <c>null</c>.
/// </summary>
/// <example>
/// <code>
/// [NotNull] object Foo() {
/// return null; // Warning: Possible 'null' assignment
/// }
/// </code>
/// </example>
[AttributeUsage(
AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |
AttributeTargets.Delegate | AttributeTargets.Field | AttributeTargets.Event |
AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.GenericParameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class NotNullAttribute : Attribute
{
}
/// <summary>
/// Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task
/// and Lazy classes to indicate that the value of a collection item, of the Task.Result property
/// or of the Lazy.Value property can never be null.
/// </summary>
[AttributeUsage(
AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |
AttributeTargets.Delegate | AttributeTargets.Field)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class ItemNotNullAttribute : Attribute
{
}
/// <summary>
/// Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task
/// and Lazy classes to indicate that the value of a collection item, of the Task.Result property
/// or of the Lazy.Value property can be null.
/// </summary>
[AttributeUsage(
AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |
AttributeTargets.Delegate | AttributeTargets.Field)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class ItemCanBeNullAttribute : Attribute
{
}
/// <summary>
/// Implicitly apply [NotNull]/[ItemNotNull] annotation to all the of type members and parameters
/// in particular scope where this annotation is used (type declaration or whole assembly).
/// </summary>
[AttributeUsage(
AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Assembly)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class ImplicitNotNullAttribute : Attribute
{
}
/// <summary>
/// Indicates that the marked method builds string by format pattern and (optional) arguments.
/// Parameter, which contains format string, should be given in constructor. The format string
/// should be in <see cref="string.Format(IFormatProvider,string,object[])" />-like form.
/// </summary>
/// <example>
/// <code>
/// [StringFormatMethod("message")]
/// void ShowError(string message, params object[] args) { /* do something */ }
///
/// void Foo() {
/// ShowError("Failed: {0}"); // Warning: Non-existing argument in format string
/// }
/// </code>
/// </example>
[AttributeUsage(
AttributeTargets.Constructor | AttributeTargets.Method |
AttributeTargets.Property | AttributeTargets.Delegate)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class StringFormatMethodAttribute : Attribute
{
/// <param name="formatParameterName">
/// Specifies which parameter of an annotated method should be treated as format-string
/// </param>
public StringFormatMethodAttribute([NotNull] string formatParameterName)
{
FormatParameterName = formatParameterName;
}
[NotNull]
public string FormatParameterName { get; private set; }
}
/// <summary>
/// For a parameter that is expected to be one of the limited set of values.
/// Specify fields of which type should be used as values for this parameter.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class ValueProviderAttribute : Attribute
{
public ValueProviderAttribute([NotNull] string name)
{
Name = name;
}
[NotNull]
public string Name { get; private set; }
}
/// <summary>
/// Indicates that the function argument should be string literal and match one
/// of the parameters of the caller function. For example, ReSharper annotates
/// the parameter of <see cref="System.ArgumentNullException" />.
/// </summary>
/// <example>
/// <code>
/// void Foo(string param) {
/// if (param == null)
/// throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class InvokerParameterNameAttribute : Attribute
{
}
/// <summary>
/// Indicates that the method is contained in a type that implements
/// <c>System.ComponentModel.INotifyPropertyChanged</c> interface and this method
/// is used to notify that some property value changed.
/// </summary>
/// <remarks>
/// The method should be non-static and conform to one of the supported signatures:
/// <list>
/// <item>
/// <c>NotifyChanged(string)</c>
/// </item>
/// <item>
/// <c>NotifyChanged(params string[])</c>
/// </item>
/// <item>
/// <c>NotifyChanged{T}(Expression{Func{T}})</c>
/// </item>
/// <item>
/// <c>NotifyChanged{T,U}(Expression{Func{T,U}})</c>
/// </item>
/// <item>
/// <c>SetProperty{T}(ref T, T, string)</c>
/// </item>
/// </list>
/// </remarks>
/// <example>
/// <code>
/// public class Foo : INotifyPropertyChanged {
/// public event PropertyChangedEventHandler PropertyChanged;
///
/// [NotifyPropertyChangedInvocator]
/// protected virtual void NotifyChanged(string propertyName) { ... }
///
/// string _name;
///
/// public string Name {
/// get { return _name; }
/// set { _name = value; NotifyChanged("LastName"); /* Warning */ }
/// }
/// }
/// </code>
/// Examples of generated notifications:
/// <list>
/// <item>
/// <c>NotifyChanged("Property")</c>
/// </item>
/// <item>
/// <c>NotifyChanged(() => Property)</c>
/// </item>
/// <item>
/// <c>NotifyChanged((VM x) => x.Property)</c>
/// </item>
/// <item>
/// <c>SetProperty(ref myField, value, "Property")</c>
/// </item>
/// </list>
/// </example>
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class NotifyPropertyChangedInvocatorAttribute : Attribute
{
public NotifyPropertyChangedInvocatorAttribute()
{
}
public NotifyPropertyChangedInvocatorAttribute([NotNull] string parameterName)
{
ParameterName = parameterName;
}
[CanBeNull]
public string ParameterName { get; private set; }
}
/// <summary>
/// Describes dependency between method input and output.
/// </summary>
/// <syntax>
/// <p>Function Definition Table syntax:</p>
/// <list>
/// <item>FDT ::= FDTRow [;FDTRow]*</item>
/// <item>FDTRow ::= Input => Output | Output <= Input</item>
/// <item>Input ::= ParameterName: Value [, Input]*</item>
/// <item>Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value}</item>
/// <item>Value ::= true | false | null | notnull | canbenull</item>
/// </list>
/// If method has single input parameter, it's name could be omitted.<br />
/// Using <c>halt</c> (or <c>void</c>/<c>nothing</c>, which is the same)
/// for method output means that the methos doesn't return normally.<br />
/// <c>canbenull</c> annotation is only applicable for output parameters.<br />
/// You can use multiple <c>[ContractAnnotation]</c> for each FDT row,
/// or use single attribute with rows separated by semicolon.<br />
/// </syntax>
/// <examples>
/// <list>
/// <item>
/// <code>
/// [ContractAnnotation("=> halt")]
/// public void TerminationMethod()
/// </code>
/// </item>
/// <item>
/// <code>
/// [ContractAnnotation("halt <= condition: false")]
/// public void Assert(bool condition, string text) // regular assertion method
/// </code>
/// </item>
/// <item>
/// <code>
/// [ContractAnnotation("s:null => true")]
/// public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty()
/// </code>
/// </item>
/// <item>
/// <code>
/// // A method that returns null if the parameter is null,
/// // and not null if the parameter is not null
/// [ContractAnnotation("null => null; notnull => notnull")]
/// public object Transform(object data)
/// </code>
/// </item>
/// <item>
/// <code>
/// [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")]
/// public bool TryParse(string s, out Person result)
/// </code>
/// </item>
/// </list>
/// </examples>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class ContractAnnotationAttribute : Attribute
{
public ContractAnnotationAttribute([NotNull] string contract)
: this(contract, false)
{
}
public ContractAnnotationAttribute([NotNull] string contract, bool forceFullStates)
{
Contract = contract;
ForceFullStates = forceFullStates;
}
[NotNull]
public string Contract { get; private set; }
public bool ForceFullStates { get; private set; }
}
/// <summary>
/// Indicates that marked element should be localized or not.
/// </summary>
/// <example>
/// <code>
/// [LocalizationRequiredAttribute(true)]
/// class Foo {
/// string str = "my string"; // Warning: Localizable string
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.All)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class LocalizationRequiredAttribute : Attribute
{
public LocalizationRequiredAttribute() : this(true)
{
}
public LocalizationRequiredAttribute(bool required)
{
Required = required;
}
public bool Required { get; private set; }
}
/// <summary>
/// Indicates that the value of the marked type (or its derivatives)
/// cannot be compared using '==' or '!=' operators and <c>Equals()</c>
/// should be used instead. However, using '==' or '!=' for comparison
/// with <c>null</c> is always permitted.
/// </summary>
/// <example>
/// <code>
/// [CannotApplyEqualityOperator]
/// class NoEquality { }
///
/// class UsesNoEquality {
/// void Test() {
/// var ca1 = new NoEquality();
/// var ca2 = new NoEquality();
/// if (ca1 != null) { // OK
/// bool condition = ca1 == ca2; // Warning
/// }
/// }
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class CannotApplyEqualityOperatorAttribute : Attribute
{
}
/// <summary>
/// When applied to a target attribute, specifies a requirement for any type marked
/// with the target attribute to implement or inherit specific type or types.
/// </summary>
/// <example>
/// <code>
/// [BaseTypeRequired(typeof(IComponent)] // Specify requirement
/// class ComponentAttribute : Attribute { }
///
/// [Component] // ComponentAttribute requires implementing IComponent interface
/// class MyComponent : IComponent { }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
[BaseTypeRequired(typeof(Attribute))]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class BaseTypeRequiredAttribute : Attribute
{
public BaseTypeRequiredAttribute([NotNull] Type baseType)
{
BaseType = baseType;
}
[NotNull]
public Type BaseType { get; private set; }
}
/// <summary>
/// Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library),
/// so this symbol will not be marked as unused (as well as by other usage inspections).
/// </summary>
[AttributeUsage(AttributeTargets.All)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class UsedImplicitlyAttribute : Attribute
{
public UsedImplicitlyAttribute()
: this(ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default)
{
}
public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags)
: this(useKindFlags, ImplicitUseTargetFlags.Default)
{
}
public UsedImplicitlyAttribute(ImplicitUseTargetFlags targetFlags)
: this(ImplicitUseKindFlags.Default, targetFlags)
{
}
public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags)
{
UseKindFlags = useKindFlags;
TargetFlags = targetFlags;
}
public ImplicitUseKindFlags UseKindFlags { get; private set; }
public ImplicitUseTargetFlags TargetFlags { get; private set; }
}
/// <summary>
/// Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes
/// as unused (as well as by other usage inspections)
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.GenericParameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class MeansImplicitUseAttribute : Attribute
{
public MeansImplicitUseAttribute()
: this(ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default)
{
}
public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags)
: this(useKindFlags, ImplicitUseTargetFlags.Default)
{
}
public MeansImplicitUseAttribute(ImplicitUseTargetFlags targetFlags)
: this(ImplicitUseKindFlags.Default, targetFlags)
{
}
public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags)
{
UseKindFlags = useKindFlags;
TargetFlags = targetFlags;
}
[UsedImplicitly]
public ImplicitUseKindFlags UseKindFlags { get; private set; }
[UsedImplicitly]
public ImplicitUseTargetFlags TargetFlags { get; private set; }
}
[Flags]
internal enum ImplicitUseKindFlags
{
Default = Access | Assign | InstantiatedWithFixedConstructorSignature,
/// <summary>Only entity marked with attribute considered used.</summary>
Access = 1,
/// <summary>Indicates implicit assignment to a member.</summary>
Assign = 2,
/// <summary>
/// Indicates implicit instantiation of a type with fixed constructor signature.
/// That means any unused constructor parameters won't be reported as such.
/// </summary>
InstantiatedWithFixedConstructorSignature = 4,
/// <summary>Indicates implicit instantiation of a type.</summary>
InstantiatedNoFixedConstructorSignature = 8
}
/// <summary>
/// Specify what is considered used implicitly when marked
/// with <see cref="MeansImplicitUseAttribute" /> or <see cref="UsedImplicitlyAttribute" />.
/// </summary>
[Flags]
internal enum ImplicitUseTargetFlags
{
Default = Itself,
Itself = 1,
/// <summary>Members of entity marked with attribute are considered used.</summary>
Members = 2,
/// <summary>Entity marked with attribute and all its members considered used.</summary>
WithMembers = Itself | Members
}
/// <summary>
/// This attribute is intended to mark publicly available API
/// which should not be removed and so is treated as used.
/// </summary>
[MeansImplicitUse(ImplicitUseTargetFlags.WithMembers)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class PublicAPIAttribute : Attribute
{
public PublicAPIAttribute()
{
}
public PublicAPIAttribute([NotNull] string comment)
{
Comment = comment;
}
[CanBeNull]
public string Comment { get; private set; }
}
/// <summary>
/// Tells code analysis engine if the parameter is completely handled when the invoked method is on stack.
/// If the parameter is a delegate, indicates that delegate is executed while the method is executed.
/// If the parameter is an enumerable, indicates that it is enumerated while the method is executed.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class InstantHandleAttribute : Attribute
{
}
/// <summary>
/// Indicates that a method does not make any observable state changes.
/// The same as <c>System.Diagnostics.Contracts.PureAttribute</c>.
/// </summary>
/// <example>
/// <code>
/// [Pure] int Multiply(int x, int y) => x * y;
///
/// void M() {
/// Multiply(123, 42); // Waring: Return value of pure method is not used
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class PureAttribute : Attribute
{
}
/// <summary>
/// Indicates that the return value of method invocation must be used.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class MustUseReturnValueAttribute : Attribute
{
public MustUseReturnValueAttribute()
{
}
public MustUseReturnValueAttribute([NotNull] string justification)
{
Justification = justification;
}
[CanBeNull]
public string Justification { get; private set; }
}
/// <summary>
/// Indicates the type member or parameter of some type, that should be used instead of all other ways
/// to get the value that type. This annotation is useful when you have some "context" value evaluated
/// and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one.
/// </summary>
/// <example>
/// <code>
/// class Foo {
/// [ProvidesContext] IBarService _barService = ...;
///
/// void ProcessNode(INode node) {
/// DoSomething(node, node.GetGlobalServices().Bar);
/// // ^ Warning: use value of '_barService' field
/// }
/// }
/// </code>
/// </example>
[AttributeUsage(
AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.Method |
AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.GenericParameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class ProvidesContextAttribute : Attribute
{
}
/// <summary>
/// Indicates that a parameter is a path to a file or a folder within a web project.
/// Path can be relative or absolute, starting from web root (~).
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class PathReferenceAttribute : Attribute
{
public PathReferenceAttribute()
{
}
public PathReferenceAttribute([NotNull, PathReference] string basePath)
{
BasePath = basePath;
}
[CanBeNull]
public string BasePath { get; private set; }
}
/// <summary>
/// An extension method marked with this attribute is processed by ReSharper code completion
/// as a 'Source Template'. When extension method is completed over some expression, it's source code
/// is automatically expanded like a template at call site.
/// </summary>
/// <remarks>
/// Template method body can contain valid source code and/or special comments starting with '$'.
/// Text inside these comments is added as source code when the template is applied. Template parameters
/// can be used either as additional method parameters or as identifiers wrapped in two '$' signs.
/// Use the <see cref="MacroAttribute" /> attribute to specify macros for parameters.
/// </remarks>
/// <example>
/// In this example, the 'forEach' method is a source template available over all values
/// of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block:
/// <code>
/// [SourceTemplate]
/// public static void forEach<T>(this IEnumerable<T> xs) {
/// foreach (var x in xs) {
/// //$ $END$
/// }
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class SourceTemplateAttribute : Attribute
{
}
/// <summary>
/// Allows specifying a macro for a parameter of a <see cref="SourceTemplateAttribute">source template</see>.
/// </summary>
/// <remarks>
/// You can apply the attribute on the whole method or on any of its additional parameters. The macro expression
/// is defined in the <see cref="MacroAttribute.Expression" /> property. When applied on a method, the target
/// template parameter is defined in the <see cref="MacroAttribute.Target" /> property. To apply the macro silently
/// for the parameter, set the <see cref="MacroAttribute.Editable" /> property value = -1.
/// </remarks>
/// <example>
/// Applying the attribute on a source template method:
/// <code>
/// [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")]
/// public static void forEach<T>(this IEnumerable<T> collection) {
/// foreach (var item in collection) {
/// //$ $END$
/// }
/// }
/// </code>
/// Applying the attribute on a template method parameter:
/// <code>
/// [SourceTemplate]
/// public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) {
/// /*$ var $x$Id = "$newguid$" + x.ToString();
/// x.DoSomething($x$Id); */
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class MacroAttribute : Attribute
{
/// <summary>
/// Allows specifying a macro that will be executed for a <see cref="SourceTemplateAttribute">source template</see>
/// parameter when the template is expanded.
/// </summary>
public string Expression { get; set; }
/// <summary>
/// Allows specifying which occurrence of the target parameter becomes editable when the template is deployed.
/// </summary>
/// <remarks>
/// If the target parameter is used several times in the template, only one occurrence becomes editable;
/// other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence,
/// use values >= 0. To make the parameter non-editable when the template is expanded, use -1.
/// </remarks>
/// >
public int Editable { get; set; }
/// <summary>
/// Identifies the target parameter of a <see cref="SourceTemplateAttribute">source template</see> if the
/// <see cref="MacroAttribute" /> is applied on a template method.
/// </summary>
public string Target { get; set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcAreaMasterLocationFormatAttribute : Attribute
{
public AspMvcAreaMasterLocationFormatAttribute([NotNull] string format)
{
Format = format;
}
[NotNull]
public string Format { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcAreaPartialViewLocationFormatAttribute : Attribute
{
public AspMvcAreaPartialViewLocationFormatAttribute([NotNull] string format)
{
Format = format;
}
[NotNull]
public string Format { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcAreaViewLocationFormatAttribute : Attribute
{
public AspMvcAreaViewLocationFormatAttribute([NotNull] string format)
{
Format = format;
}
[NotNull]
public string Format { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcMasterLocationFormatAttribute : Attribute
{
public AspMvcMasterLocationFormatAttribute(string format)
{
Format = format;
}
public string Format { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcPartialViewLocationFormatAttribute : Attribute
{
public AspMvcPartialViewLocationFormatAttribute([NotNull] string format)
{
Format = format;
}
[NotNull]
public string Format { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcViewLocationFormatAttribute : Attribute
{
public AspMvcViewLocationFormatAttribute([NotNull] string format)
{
Format = format;
}
[NotNull]
public string Format { get; private set; }
}
/// <summary>
/// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
/// is an MVC action. If applied to a method, the MVC action name is calculated
/// implicitly from the context. Use this attribute for custom wrappers similar to
/// <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcActionAttribute : Attribute
{
public AspMvcActionAttribute()
{
}
public AspMvcActionAttribute([NotNull] string anonymousProperty)
{
AnonymousProperty = anonymousProperty;
}
[CanBeNull]
public string AnonymousProperty { get; private set; }
}
/// <summary>
/// ASP.NET MVC attribute. Indicates that a parameter is an MVC area.
/// Use this attribute for custom wrappers similar to
/// <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcAreaAttribute : Attribute
{
public AspMvcAreaAttribute()
{
}
public AspMvcAreaAttribute([NotNull] string anonymousProperty)
{
AnonymousProperty = anonymousProperty;
}
[CanBeNull]
public string AnonymousProperty { get; private set; }
}
/// <summary>
/// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is
/// an MVC controller. If applied to a method, the MVC controller name is calculated
/// implicitly from the context. Use this attribute for custom wrappers similar to
/// <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcControllerAttribute : Attribute
{
public AspMvcControllerAttribute()
{
}
public AspMvcControllerAttribute([NotNull] string anonymousProperty)
{
AnonymousProperty = anonymousProperty;
}
[CanBeNull]
public string AnonymousProperty { get; private set; }
}
/// <summary>
/// ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute
/// for custom wrappers similar to <c>System.Web.Mvc.Controller.View(String, String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcMasterAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute
/// for custom wrappers similar to <c>System.Web.Mvc.Controller.View(String, Object)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcModelTypeAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC
/// partial view. If applied to a method, the MVC partial view name is calculated implicitly
/// from the context. Use this attribute for custom wrappers similar to
/// <c>System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcPartialViewAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcSuppressViewErrorAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. Indicates that a parameter is an MVC display template.
/// Use this attribute for custom wrappers similar to
/// <c>System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcDisplayTemplateAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template.
/// Use this attribute for custom wrappers similar to
/// <c>System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcEditorTemplateAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. Indicates that a parameter is an MVC template.
/// Use this attribute for custom wrappers similar to
/// <c>System.ComponentModel.DataAnnotations.UIHintAttribute(System.String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcTemplateAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
/// is an MVC view component. If applied to a method, the MVC view name is calculated implicitly
/// from the context. Use this attribute for custom wrappers similar to
/// <c>System.Web.Mvc.Controller.View(Object)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcViewAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
/// is an MVC view component name.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcViewComponentAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
/// is an MVC view component view. If applied to a method, the MVC view component view name is default.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcViewComponentViewAttribute : Attribute
{
}
/// <summary>
/// ASP.NET MVC attribute. When applied to a parameter of an attribute,
/// indicates that this parameter is an MVC action name.
/// </summary>
/// <example>
/// <code>
/// [ActionName("Foo")]
/// public ActionResult Login(string returnUrl) {
/// ViewBag.ReturnUrl = Url.Action("Foo"); // OK
/// return RedirectToAction("Bar"); // Error: Cannot resolve action
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMvcActionSelectorAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class HtmlElementAttributesAttribute : Attribute
{
public HtmlElementAttributesAttribute()
{
}
public HtmlElementAttributesAttribute([NotNull] string name)
{
Name = name;
}
[CanBeNull]
public string Name { get; private set; }
}
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class HtmlAttributeValueAttribute : Attribute
{
public HtmlAttributeValueAttribute([NotNull] string name)
{
Name = name;
}
[NotNull]
public string Name { get; private set; }
}
/// <summary>
/// Razor attribute. Indicates that a parameter or a method is a Razor section.
/// Use this attribute for custom wrappers similar to
/// <c>System.Web.WebPages.WebPageBase.RenderSection(String)</c>.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorSectionAttribute : Attribute
{
}
/// <summary>
/// Indicates how method, constructor invocation or property access
/// over collection type affects content of the collection.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class CollectionAccessAttribute : Attribute
{
public CollectionAccessAttribute(CollectionAccessType collectionAccessType)
{
CollectionAccessType = collectionAccessType;
}
public CollectionAccessType CollectionAccessType { get; private set; }
}
[Flags]
internal enum CollectionAccessType
{
/// <summary>Method does not use or modify content of the collection.</summary>
None = 0,
/// <summary>Method only reads content of the collection but does not modify it.</summary>
Read = 1,
/// <summary>Method can change content of the collection but does not add new elements.</summary>
ModifyExistingContent = 2,
/// <summary>Method can add new elements to the collection.</summary>
UpdatedContent = ModifyExistingContent | 4
}
/// <summary>
/// Indicates that the marked method is assertion method, i.e. it halts control flow if
/// one of the conditions is satisfied. To set the condition, mark one of the parameters with
/// <see cref="AssertionConditionAttribute" /> attribute.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AssertionMethodAttribute : Attribute
{
}
/// <summary>
/// Indicates the condition parameter of the assertion method. The method itself should be
/// marked by <see cref="AssertionMethodAttribute" /> attribute. The mandatory argument of
/// the attribute is the assertion type.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AssertionConditionAttribute : Attribute
{
public AssertionConditionAttribute(AssertionConditionType conditionType)
{
ConditionType = conditionType;
}
public AssertionConditionType ConditionType { get; private set; }
}
/// <summary>
/// Specifies assertion type. If the assertion method argument satisfies the condition,
/// then the execution continues. Otherwise, execution is assumed to be halted.
/// </summary>
internal enum AssertionConditionType
{
/// <summary>Marked parameter should be evaluated to true.</summary>
IS_TRUE = 0,
/// <summary>Marked parameter should be evaluated to false.</summary>
IS_FALSE = 1,
/// <summary>Marked parameter should be evaluated to null value.</summary>
IS_NULL = 2,
/// <summary>Marked parameter should be evaluated to not null value.</summary>
IS_NOT_NULL = 3
}
/// <summary>
/// Indicates that the marked method unconditionally terminates control flow execution.
/// For example, it could unconditionally throw exception.
/// </summary>
[Obsolete("Use [ContractAnnotation('=> halt')] instead")]
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class TerminatesProgramAttribute : Attribute
{
}
/// <summary>
/// Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select,
/// .Where). This annotation allows inference of [InstantHandle] annotation for parameters
/// of delegate type by analyzing LINQ method chains.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class LinqTunnelAttribute : Attribute
{
}
/// <summary>
/// Indicates that IEnumerable, passed as parameter, is not enumerated.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class NoEnumerationAttribute : Attribute
{
}
/// <summary>
/// Indicates that parameter is regular expression pattern.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RegexPatternAttribute : Attribute
{
}
/// <summary>
/// XAML attribute. Indicates the type that has <c>ItemsSource</c> property and should be treated
/// as <c>ItemsControl</c>-derived type, to enable inner items <c>DataContext</c> type resolve.
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class XamlItemsControlAttribute : Attribute
{
}
/// <summary>
/// XAML attribute. Indicates the property of some <c>BindingBase</c>-derived type, that
/// is used to bind some item of <c>ItemsControl</c>-derived type. This annotation will
/// enable the <c>DataContext</c> type resolve for XAML bindings for such properties.
/// </summary>
/// <remarks>
/// Property should have the tree ancestor of the <c>ItemsControl</c> type or
/// marked with the <see cref="XamlItemsControlAttribute" /> attribute.
/// </remarks>
[AttributeUsage(AttributeTargets.Property)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class XamlItemBindingOfItemsControlAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspChildControlTypeAttribute : Attribute
{
public AspChildControlTypeAttribute([NotNull] string tagName, [NotNull] Type controlType)
{
TagName = tagName;
ControlType = controlType;
}
[NotNull]
public string TagName { get; private set; }
[NotNull]
public Type ControlType { get; private set; }
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspDataFieldAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspDataFieldsAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspMethodPropertyAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspRequiredAttributeAttribute : Attribute
{
public AspRequiredAttributeAttribute([NotNull] string attribute)
{
Attribute = attribute;
}
[NotNull]
public string Attribute { get; private set; }
}
[AttributeUsage(AttributeTargets.Property)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class AspTypePropertyAttribute : Attribute
{
public AspTypePropertyAttribute(bool createConstructorReferences)
{
CreateConstructorReferences = createConstructorReferences;
}
public bool CreateConstructorReferences { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorImportNamespaceAttribute : Attribute
{
public RazorImportNamespaceAttribute([NotNull] string name)
{
Name = name;
}
[NotNull]
public string Name { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorInjectionAttribute : Attribute
{
public RazorInjectionAttribute([NotNull] string type, [NotNull] string fieldName)
{
Type = type;
FieldName = fieldName;
}
[NotNull]
public string Type { get; private set; }
[NotNull]
public string FieldName { get; private set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorDirectiveAttribute : Attribute
{
public RazorDirectiveAttribute([NotNull] string directive)
{
Directive = directive;
}
[NotNull]
public string Directive { get; private set; }
}
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorHelperCommonAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorLayoutAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorWriteLiteralMethodAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Method)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorWriteMethodAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class RazorWriteMethodParameterAttribute : Attribute
{
}
/// <summary>
/// Prevents the Member Reordering feature from tossing members of the marked class.
/// </summary>
/// <remarks>
/// The attribute must be mentioned in your member reordering patterns
/// </remarks>
[AttributeUsage(AttributeTargets.All)]
[Conditional("JETBRAINS_ANNOTATIONS")]
internal sealed class NoReorder : Attribute
{
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Sakura.AspNetCore.AsyncPagedList")]
[assembly: AssemblyTrademark("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7581ce0a-0080-4d53-b22e-18e6cf251f3a")]
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/Sakura.AspNetCore.AsyncPagedList.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<AssemblyName>Sakura.AspNetCore.AsyncPagedList</AssemblyName>
<PackageId>Sakura.AspNetCore.AsyncPagedList</PackageId>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Sakura.AspNetCore.PagedList\Sakura.AspNetCore.PagedList.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Interactive.Async" Version="3.0.0" />
</ItemGroup>
</Project>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ApplicationBuilderExtensions.cs
================================================
using System;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Identity;
#if !NETSTANDARD2_0
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
#endif
// ReSharper disable once CheckNamespace
namespace Microsoft.AspNet.Builder;
/// <summary>
/// Provide extension methods for <see cref="IApplicationBuilder" />. This class is static.
/// </summary>
public static class ApplicationBuilderExtensions
{
/// <summary>
/// Configure a application to enable all cookie-related authentication schemes.
/// </summary>
/// <param name="app">The <see cref="IApplicationBuilder" /> object.</param>
/// <exception cref="ArgumentNullException">The <paramref name="app" /> is <c>null</c>.</exception>
#if NETSTANDARD2_0 || NETCOREAPP3_0
[PublicAPI]
[Obsolete("This API is obsolete. Plase use UseAuthentication method provided by ASP.NET Core 2 directly.")]
public static void UseAllCookies([NotNull] this IApplicationBuilder app)
{
if (app == null)
throw new ArgumentNullException(nameof(app));
app.UseAuthentication();
}
#else
[PublicAPI]
public static void UseAllCookies([NotNull] this IApplicationBuilder app)
{
if (app == null)
throw new ArgumentNullException(nameof(app));
// Get the identity options
var identityOptions = app.ApplicationServices.GetService<IOptions<IdentityOptions>>().Value;
// Configure cookie authentications with specified order
app.UseCookieAuthentication(identityOptions.Cookies.ExternalCookie);
app.UseCookieAuthentication(identityOptions.Cookies.TwoFactorRememberMeCookie);
app.UseCookieAuthentication(identityOptions.Cookies.TwoFactorUserIdCookie);
app.UseCookieAuthentication(identityOptions.Cookies.ApplicationCookie);
}
#endif
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSecurityStampValidator.cs
================================================
using System.Security.Claims;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Identity;
namespace Sakura.AspNetCore.Authentication;
/// <inheritdoc />
/// <summary>
/// Provide default implementation for <see cref="T:Microsoft.AspNetCore.Identity.ISecurityStampValidator" /> service.
/// </summary>
[UsedImplicitly]
public class ExternalSecurityStampValidator : ISecurityStampValidator
{
/// <summary>
/// Validates a security stamp of an identity as an asynchronous operation, and rebuilds the identity if the validation
/// succeeds, otherwise rejects
/// the identity.
/// </summary>
/// <param name="context">
/// The context containing the <see cref="ClaimsPrincipal" />
/// and <see cref="AuthenticationProperties" /> to validate.
/// </param>
/// <returns>The <see cref="Task" /> that represents the asynchronous validation operation.</returns>
public Task ValidateAsync(CookieValidatePrincipalContext context)
{
return Task.FromResult(0);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.Net1.cs
================================================
#if NET451 || NETSTANDARD1_3
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Authentication;
using Microsoft.Extensions.Options;
namespace Sakura.AspNetCore.Authentication
{
public partial class ExternalSignInManager
{
/// <summary>
/// Initialize a new instance.
/// </summary>
/// <param name="httpContextAccessor">HTTP context accessor.</param>
/// <param name="identityOptions">Identity options.</param>
public ExternalSignInManager(IHttpContextAccessor httpContextAccessor, IOptions<IdentityOptions> identityOptions)
{
Authentication = httpContextAccessor.HttpContext.Authentication;
IdentityOptions = identityOptions.Value;
}
/// <summary>
/// Get the <see cref="IdentityOptions" /> instance.
/// </summary>
private IdentityOptions IdentityOptions { get; }
private AuthenticationManager Authentication { get; }
/// <summary>
/// Sign in current user using stored external cookie information.
/// </summary>
/// <returns>
/// If signing-in is succeeded, returns the generated <see cref="ClaimsPrincipal" /> object for current user;
/// otherwise, returns <c>null</c>.
/// </returns>
[PublicAPI]
public async Task<ClaimsPrincipal> SignInFromExternalCookieAsync()
{
var externalLoginInfo = await GetExternalPrincipalAsync();
if (externalLoginInfo == null)
return null;
// the new schame to replace the old one
var newScheme = IdentityOptions.Cookies.ApplicationCookieAuthenticationScheme;
await Authentication.SignInAsync(newScheme, externalLoginInfo.CloneAs(newScheme));
return externalLoginInfo;
}
/// <summary>
/// Get the external principal stored in the external cookie.
/// </summary>
/// <returns>A <see cref="ClaimsPrincipal" /> object represents as the external principal.</returns>
[PublicAPI]
public Task<ClaimsPrincipal> GetExternalPrincipalAsync()
{
return Authentication.AuthenticateAsync(IdentityOptions.Cookies.ExternalCookieAuthenticationScheme);
}
/// <summary>
/// Sign out current user.
/// </summary>
/// <returns>A task represents as an async operation.</returns>
[PublicAPI]
public async Task SignOutAsync()
{
await Authentication.SignOutAsync(IdentityOptions.Cookies.ApplicationCookieAuthenticationScheme);
await Authentication.SignOutAsync(IdentityOptions.Cookies.ExternalCookieAuthenticationScheme);
}
/// <summary>
/// Get a value that indicates whether the current user is signed-in with application's primary authentication scheme.
/// </summary>
/// <param name="principal">The user principal instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="principal" /> is <c>null</c>.</exception>
/// <returns>
/// If the current user is signed-in with application's primary authentication scheme, returns <c>true</c>;
/// otherwise, returns <c>false</c>.
/// </returns>
[PublicAPI]
public bool IsSignedIn([NotNull] ClaimsPrincipal principal)
{
if (principal == null)
throw new ArgumentNullException(nameof(principal));
return principal.Identities.Any(i => i.AuthenticationType == IdentityOptions.Cookies.ApplicationCookieAuthenticationScheme);
}
/// <summary>
/// Get all external authentication schemes registered in the current appliation.
/// </summary>
/// <returns>The collection of <see cref="AuthenticationDescription" /> for all registered external authentication schemes.</returns>
[PublicAPI]
[NotNull]
[ItemNotNull]
public IEnumerable<AuthenticationDescription> GetExternalAuthenticationSchemes()
{
return Authentication.GetAuthenticationSchemes().Where(i => !string.IsNullOrEmpty(i.DisplayName));
}
}
}
#endif
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.Net2.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Options;
namespace Sakura.AspNetCore.Authentication;
#if NETSTANDARD2_0 || NETCOREAPP3_0
public partial class ExternalSignInManager
{
/// <summary>
/// Initialize a new instance of <see cref="ExternalSignInManager" />.
/// </summary>
/// <param name="httpContextAccessor">The <see cref="IHttpContextAccessor" /> service instance.</param>
/// <param name="authenticationSchemeProvider">the <see cref="IAuthenticationSchemeProvider" /> service instance.</param>
/// <param name="identityOptions">The Options of <see cref="Microsoft.AspNetCore.Identity.IdentityOptions" />.</param>
public ExternalSignInManager(IHttpContextAccessor httpContextAccessor,
IAuthenticationSchemeProvider authenticationSchemeProvider, IOptions<IdentityOptions> identityOptions)
{
HttpContext = httpContextAccessor.HttpContext;
AuthenticationSchemeProvider = authenticationSchemeProvider;
IdentityOptions = identityOptions.Value;
}
/// <summary>
/// Get the <see cref="Microsoft.AspNetCore.Http.HttpContext" /> instance.
/// </summary>
private HttpContext HttpContext { get; }
/// <summary>
/// Get thse <see cref="Microsoft.AspNetCore.Identity.IdentityOptions" /> value.
/// </summary>
private IdentityOptions IdentityOptions { get; }
/// <summary>
/// Get the <see cref="IAuthenticationSchemeProvider" /> service.
/// </summary>
private IAuthenticationSchemeProvider AuthenticationSchemeProvider { get; }
/// <summary>
/// Sign in current user using stored external cookie information.
/// </summary>
/// <returns>
/// If signing-in is succeeded, returns the generated <see cref="ClaimsPrincipal" /> object for current user;
/// otherwise, returns <c>null</c>.
/// </returns>
[PublicAPI]
public async Task<ClaimsPrincipal> SignInFromExternalCookieAsync()
{
var externalLoginInfo = await GetExternalPrincipalAsync();
if (externalLoginInfo == null)
return null;
// the new schame to replace the old one
var newScheme = IdentityConstants.ApplicationScheme;
await HttpContext.SignInAsync(externalLoginInfo.CloneAs(newScheme));
return externalLoginInfo;
}
/// <summary>
/// Get the external principal stored in the external cookie.
/// </summary>
/// <returns>A <see cref="ClaimsPrincipal" /> object represents as the external principal.</returns>
[PublicAPI]
public async Task<ClaimsPrincipal> GetExternalPrincipalAsync()
{
var result = await HttpContext.AuthenticateAsync(IdentityConstants.ExternalScheme);
return result.Principal;
}
/// <summary>
/// Sign out current user.
/// </summary>
/// <returns>A task represents as an async operation.</returns>
[PublicAPI]
public async Task SignOutAsync()
{
await HttpContext.SignOutAsync(IdentityConstants.ApplicationScheme);
await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);
}
/// <summary>
/// Get a value that indicates whether the current user is signed-in with application's primary authentication scheme.
/// </summary>
/// <param name="principal">The user principal instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="principal" /> is <c>null</c>.</exception>
/// <returns>
/// If the current user is signed-in with application's primary authentication scheme, returns <c>true</c>;
/// otherwise, returns <c>false</c>.
/// </returns>
[PublicAPI]
public bool IsSignedIn([NotNull] ClaimsPrincipal principal)
{
if (principal == null)
throw new ArgumentNullException(nameof(principal));
return principal.Identities.Any(i => i.AuthenticationType == IdentityConstants.ApplicationScheme);
}
/// <summary>
/// Get all external authentication schemes registered in the current appliation.
/// </summary>
/// <returns>The collection of <see cref="AuthenticationDescription" /> for all registered external authentication schemes.</returns>
[PublicAPI]
[NotNull]
[ItemNotNull]
public async Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync()
{
var allSchemes = await AuthenticationSchemeProvider.GetAllSchemesAsync();
return allSchemes.Where(i => !string.IsNullOrEmpty(i.DisplayName));
}
}
#endif
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Identity;
namespace Sakura.AspNetCore.Authentication;
/// <summary>
/// Provide methods used for external signing-in co-operations.
/// </summary>
public partial class ExternalSignInManager
{
/// <summary>
/// Get the user name from a <see cref="ClaimsIdentity" />.
/// </summary>
/// <param name="identity">The <see cref="ClaimsIdentity" /> instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="identity" /> is <c>null</c>.</exception>
/// <returns>
/// The user name included in the <paramref name="identity" />. If no user name is included, this method will
/// return <c>null</c>.
/// </returns>
[PublicAPI]
public string? GetUserName([NotNull] ClaimsIdentity identity)
{
if (identity == null)
throw new ArgumentNullException(nameof(identity));
return identity.FindFirst(IdentityOptions.ClaimsIdentity.UserNameClaimType)?.Value;
}
/// <summary>
/// Get the user name from a <see cref="ClaimsPrincipal" />.
/// </summary>
/// <param name="principal">The <see cref="ClaimsPrincipal" /> instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="principal" /> is <c>null</c>.</exception>
/// <returns>
/// The user name included in the <paramref name="principal" />. If no user name is included, this method will
/// return <c>null</c>.
/// </returns>
[PublicAPI]
public string? GetUserName([NotNull] ClaimsPrincipal principal)
{
if (principal == null)
throw new ArgumentNullException(nameof(principal));
return principal.FindFirst(IdentityOptions.ClaimsIdentity.UserNameClaimType)?.Value;
}
/// <summary>
/// Get the user identifier from a <see cref="ClaimsIdentity" />.
/// </summary>
/// <param name="identity">The <see cref="ClaimsIdentity" /> instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="identity" /> is <c>null</c>.</exception>
/// <returns>
/// The user identifier included in the <paramref name="identity" />. If no user identifier is included, this
/// method will return <c>null</c>.
/// </returns>
[PublicAPI]
public string? GetUserId([NotNull] ClaimsIdentity identity)
{
if (identity == null)
throw new ArgumentNullException(nameof(identity));
return identity.FindFirst(IdentityOptions.ClaimsIdentity.UserIdClaimType)?.Value;
}
/// <summary>
/// Get the user identifier from a <see cref="ClaimsPrincipal" />.
/// </summary>
/// <param name="principal">The <see cref="ClaimsPrincipal" /> instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="principal" /> is <c>null</c>.</exception>
/// <returns>
/// The user identifier included in the <paramref name="principal" />. If no user identifier is included, this
/// method will return <c>null</c>.
/// </returns>
[PublicAPI]
public string? GetUserId([NotNull] ClaimsPrincipal principal)
{
if (principal == null)
throw new ArgumentNullException(nameof(principal));
return principal.FindFirst(IdentityOptions.ClaimsIdentity.UserIdClaimType)?.Value;
}
/// <summary>
/// Get the the collection of all roles for a <see cref="ClaimsPrincipal" />.
/// </summary>
/// <param name="principal">The <see cref="ClaimsPrincipal" /> instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="principal" /> is <c>null</c>.</exception>
/// <returns>
/// A collection that including all the roles for the <paramref name="principal" />. If the user has no roles,
/// this method will return a empty collection.
/// </returns>
[NotNull]
[PublicAPI]
public IEnumerable<string> GetUserRoles([NotNull] ClaimsPrincipal principal)
{
if (principal == null)
throw new ArgumentNullException(nameof(principal));
return principal.FindAll(IdentityOptions.ClaimsIdentity.RoleClaimType).Select(i => i.Value);
}
/// <summary>
/// Get the the collection of all roles for a <see cref="ClaimsIdentity" />.
/// </summary>
/// <param name="identity">The <see cref="ClaimsIdentity" /> instance.</param>
/// <exception cref="ArgumentNullException">The <paramref name="identity" /> is <c>null</c>.</exception>
/// <returns>
/// A collection that including all the roles for the <paramref name="identity" />. If the user has no roles, this
/// method will return a empty collection.
/// </returns>
[NotNull]
[PublicAPI]
public IEnumerable<string> GetUserRoles([NotNull] ClaimsIdentity identity)
{
if (identity == null)
throw new ArgumentNullException(nameof(identity));
return identity.FindAll(IdentityOptions.ClaimsIdentity.RoleClaimType).Select(i => i.Value);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/IdentityHelper.cs
================================================
using System;
using System.Linq;
using System.Security.Claims;
using JetBrains.Annotations;
namespace Sakura.AspNetCore.Authentication;
/// <summary>
/// Provide utility methods for identity operations. This class is static.
/// </summary>
[PublicAPI]
public static class IdentityHelper
{
/// <summary>
/// Create a new <see cref="ClaimsIdentity" /> based on a existing <see cref="ClaimsIdentity" /> with a new
/// authentication type.
/// </summary>
/// <param name="identity">The identity to be cloned.</param>
/// <param name="authenticationType">The authentication type of the new identity.</param>
/// <returns>The cloned new identity.</returns>
/// <exception cref="ArgumentNullException">
/// The <paramref name="identity" /> or <paramref name="authenticationType" /> is
/// <c>null</c>.
/// </exception>
public static ClaimsIdentity CloneAs(this ClaimsIdentity identity, string authenticationType)
{
if (identity == null)
throw new ArgumentNullException(nameof(identity));
if (authenticationType == null)
throw new ArgumentNullException(nameof(authenticationType));
return new ClaimsIdentity(identity.Claims, authenticationType, identity.NameClaimType,
identity.RoleClaimType);
}
/// <summary>
/// Create a new <see cref="ClaimsPrincipal" /> based on a existing <see cref="ClaimsPrincipal" /> with a new
/// authentication type for all of its identities.
/// </summary>
/// <param name="principal">The principal to be cloned.</param>
/// <param name="authenticationType">The authentication type of the new identity.</param>
/// <returns>The cloned new principal.</returns>
/// <exception cref="ArgumentNullException">
/// The <paramref name="principal" /> or <paramref name="authenticationType" /> is
/// <c>null</c>.
/// </exception>
public static ClaimsPrincipal CloneAs(this ClaimsPrincipal principal, string authenticationType)
{
if (principal == null)
throw new ArgumentNullException(nameof(principal));
if (authenticationType == null)
throw new ArgumentNullException(nameof(authenticationType));
var newIdentities = principal.Identities.Select(i => i.CloneAs(authenticationType));
return new ClaimsPrincipal(newIdentities);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/Sakura.AspNetCore.Authentication.ExternalCookie.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>This library is used to simplify the pipeline to use external cookie identity as application identity directly.</Description>
<AssemblyTitle>ASP.NET Core External Cookie Library</AssemblyTitle>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>Iris Sakura</Authors>
<TargetFrameworks>netstandard1.3;net451;netstandard2.0;netcoreapp3.0</TargetFrameworks>
<AssemblyName>Sakura.AspNetCore.Authentication.ExternalCookie</AssemblyName>
<PackageId>Sakura.AspNetCore.Authentication.ExternalCookie</PackageId>
<PackageTags>ASP.NET;ASP.NETCore;Identity;External Cookie</PackageTags>
<PackageReleaseNotes>Add support for ASP.NET Core 3.0</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/sgjsakura/AspNetCore</PackageProjectUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageIconUrl></PackageIconUrl>
<RepositoryUrl>https://github.com/sgjsakura/AspNetCore.git</RepositoryUrl>
<RootNamespace>Sakura.AspNetCore.Authentication</RootNamespace>
<Version>2.2.0</Version>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="1.0.6" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="1.0.6" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
</ItemGroup>
</Project>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ServiceCollectionExtensions.cs
================================================
using System;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Sakura.AspNetCore.Authentication;
#if !NETSTANDARD2_0
using Microsoft.AspNetCore.Builder;
#endif
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
/// Provide helper methods to adding external signing-in service to application. This class is static.
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// Add external signing-in manager service for application.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection" /> instance.</param>
/// <param name="setupOptions">A setup method for configuring identity options.</param>
[PublicAPI]
public static void AddExternalSignInManager([NotNull] this IServiceCollection services,
Action<IdentityOptions> setupOptions = null)
{
if (services == null)
throw new ArgumentNullException(nameof(services));
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
services.TryAddSingleton<ISecurityStampValidator, ExternalSecurityStampValidator>();
services.TryAddScoped<ExternalSignInManager>();
if (setupOptions != null)
services.Configure(setupOptions);
#if NETSTANDARD2_0
services.AddAuthentication(IdentityConstants.ApplicationScheme)
.AddCookie(IdentityConstants.ApplicationScheme)
.AddCookie(IdentityConstants.ExternalScheme)
.AddCookie(IdentityConstants.TwoFactorUserIdScheme)
.AddCookie(IdentityConstants.TwoFactorRememberMeScheme);
#endif
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicHtmlLocalizer.cs
================================================
using Microsoft.AspNetCore.Mvc.Localization;
namespace Sakura.AspNetCore.Localization;
/// <summary>
/// Define the necessary feature for dynamic style HTML resource accessing.
/// </summary>
public interface IDynamicHtmlLocalizer
{
/// <summary>
/// Get the dynamic object used to access resource strings as HTML format.
/// </summary>
dynamic Html { get; }
/// <summary>
/// Get the dynamic object used to access resource strings as text format.
/// </summary>
dynamic Text { get; }
/// <summary>
/// Get the internal <see cref="IHtmlLocalizer" /> service instance.
/// </summary>
IHtmlLocalizer Localizer { get; }
}
/// <summary>
/// Provide strong typed resource class for dynamic style HTML resource accessing.
/// </summary>
/// <typeparam name="TResource">The resource type.</typeparam>
public interface IDynamicHtmlLocalizer<TResource> : IDynamicHtmlLocalizer
{
/// <summary>
/// Get the strong typed internal <see cref="IHtmlLocalizer{TResource}" /> service instance.
/// </summary>
new IHtmlLocalizer<TResource> Localizer { get; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicStringLocalizer.cs
================================================
using Microsoft.Extensions.Localization;
namespace Sakura.AspNetCore.Localization;
/// <summary>
/// Provide strong typed resource class for dynamic style text resource accessing.
/// </summary>
/// <typeparam name="TResource">The resource type.</typeparam>
public interface IDynamicStringLocalizer<TResource> : IDynamicStringLocalizer
{
/// <summary>
/// Get the internal <see cref="IStringLocalizer{T}" /> service instance.
/// </summary>
new IStringLocalizer<TResource> Localizer { get; }
}
/// <summary>
/// Define the necessary feature for dynamic style text resource accessing.
/// </summary>
public interface IDynamicStringLocalizer
{
/// <summary>
/// Get the dynamic object used to access resource strings as text format.
/// </summary>
dynamic Text { get; }
/// <summary>
/// Get the internal <see cref="IStringLocalizer" /> service instance.
/// </summary>
IStringLocalizer Localizer { get; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicViewLocalizer.cs
================================================
using Microsoft.AspNetCore.Mvc.Localization;
namespace Sakura.AspNetCore.Localization;
/// <summary>
/// Provide dynamic style localizable string resource accessibility for <see cref="IViewLocalizer" /> service.
/// </summary>
public interface IDynamicViewLocalizer : IDynamicHtmlLocalizer
{
/// <summary>
/// Get the internal <see cref="IViewLocalizer" /> service instance.
/// </summary>
new IViewLocalizer Localizer { get; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlLocalizer.cs
================================================
using System;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc.Localization;
namespace Sakura.AspNetCore.Localization.Internal;
/// <summary>
/// Provide the default implementation for <see cref="IDynamicHtmlLocalizer" /> service.
/// </summary>
public abstract class DynamicHtmlLocalizer : IDynamicHtmlLocalizer
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicHtmlLocalizer" /> service.
/// </summary>
/// <param name="localizer">The internal <see cref="IHtmlLocalizer" /> service.</param>
/// <exception cref="ArgumentNullException">The <paramref name="localizer" /> is <c>null</c>.</exception>
protected DynamicHtmlLocalizer([NotNull] IHtmlLocalizer localizer)
{
Localizer = localizer ?? throw new ArgumentNullException(nameof(localizer));
Html = new DynamicHtmlLocalizerWrapper(localizer);
Text = new DynamicHtmlTextLocalizerWrapper(localizer);
}
/// <inheritdoc />
public dynamic Html { get; }
/// <inheritdoc />
public dynamic Text { get; }
/// <inheritdoc />
public IHtmlLocalizer Localizer { get; }
}
/// <summary>
/// Provide the default implementation for <see cref="IDynamicHtmlLocalizer{TResource}" /> service.
/// </summary>
public class DynamicHtmlLocalizer<TResource> : DynamicHtmlLocalizer, IDynamicHtmlLocalizer<TResource>
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicHtmlLocalizer{TResource}" /> service.
/// </summary>
/// <param name="localizer">The internal <see cref="IHtmlLocalizer{TResource}" /> service.</param>
/// <exception cref="ArgumentNullException">The <paramref name="localizer" /> is <c>null</c>.</exception>
[UsedImplicitly]
public DynamicHtmlLocalizer([NotNull] IHtmlLocalizer<TResource> localizer)
: base(localizer)
{
Localizer = localizer;
}
/// <inheritdoc />
public new IHtmlLocalizer<TResource> Localizer { get; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlLocalizerWrapper.cs
================================================
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc.Localization;
namespace Sakura.AspNetCore.Localization.Internal;
/// <summary>
/// Provide the dynamic style implementation for <see cref="IHtmlLocalizer" /> object.
/// </summary>
public class DynamicHtmlLocalizerWrapper : DynamicObject, IDynamicLocalizerWrapper
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicHtmlLocalizerWrapper" /> object.
/// </summary>
/// <param name="innerLocalizer">The internal <see cref="IHtmlLocalizer" /> object.</param>
public DynamicHtmlLocalizerWrapper([NotNull] IHtmlLocalizer innerLocalizer)
{
InnerLocalizer = innerLocalizer ?? throw new ArgumentNullException(nameof(innerLocalizer));
}
/// <summary>
/// Get the internal <see cref="IHtmlLocalizer" /> service.
/// </summary>
private IHtmlLocalizer InnerLocalizer { get; }
/// <inheritdoc />
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
result = InnerLocalizer[binder.Name];
return true;
}
/// <inheritdoc />
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
result = InnerLocalizer[binder.Name, args];
return true;
}
/// <inheritdoc />
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
{
if (indexes.Length == 0)
throw new ArgumentException(nameof(indexes), "The length of index array cannot be zero.");
if (indexes[0] is string name)
result = InnerLocalizer[name, indexes.Skip(1).ToArray()];
else
throw new ArgumentException(nameof(indexes), "The first index value must be a string.");
return true;
}
/// <inheritdoc />
public override IEnumerable<string> GetDynamicMemberNames()
{
return InnerLocalizer.GetAllStrings().Select(i => i.Name);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlTextLocalizerWrapper.cs
================================================
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc.Localization;
namespace Sakura.AspNetCore.Localization.Internal;
/// <summary>
/// Provide the dynamic style implementation for <see cref="IHtmlLocalizer" /> object.
/// </summary>
public class DynamicHtmlTextLocalizerWrapper : DynamicObject, IDynamicLocalizerWrapper
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicHtmlLocalizerWrapper" /> object.
/// </summary>
/// <param name="innerLocalizer">The internal <see cref="IHtmlLocalizer" /> object.</param>
public DynamicHtmlTextLocalizerWrapper([NotNull] IHtmlLocalizer innerLocalizer)
{
InnerLocalizer = innerLocalizer ?? throw new ArgumentNullException(nameof(innerLocalizer));
}
/// <summary>
/// Get the internal <see cref="IHtmlLocalizer" /> service.
/// </summary>
private IHtmlLocalizer InnerLocalizer { get; }
/// <inheritdoc />
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
result = InnerLocalizer.GetString(binder.Name);
return true;
}
/// <inheritdoc />
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
result = InnerLocalizer.GetString(binder.Name, args);
return true;
}
/// <inheritdoc />
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
{
if (indexes.Length == 0)
throw new ArgumentException(nameof(indexes), "The length of index array cannot be zero.");
if (indexes[0] is string name)
result = InnerLocalizer.GetString(name, indexes.Skip(1).ToArray());
else
throw new ArgumentException(nameof(indexes), "The first index value must be a string.");
return true;
}
/// <inheritdoc />
public override IEnumerable<string> GetDynamicMemberNames()
{
return InnerLocalizer.GetAllStrings().Select(i => i.Name);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicStringLocalizer.cs
================================================
using System;
using JetBrains.Annotations;
using Microsoft.Extensions.Localization;
namespace Sakura.AspNetCore.Localization.Internal;
/// <summary>
/// Provide the default implementation for <see cref="IDynamicStringLocalizer" /> service.
/// </summary>
public class DynamicStringLocalizer : IDynamicStringLocalizer
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicStringLocalizer" /> service.
/// </summary>
/// <param name="localizer">The internal <see cref="IStringLocalizer" /> service.</param>
/// <exception cref="ArgumentNullException">The <paramref name="localizer" /> is <c>null</c>.</exception>
public DynamicStringLocalizer([NotNull] IStringLocalizer localizer)
{
Localizer = localizer ?? throw new ArgumentNullException(nameof(localizer));
Text = new DynamicStringLocalizerWrapper(localizer);
}
/// <inheritdoc />
public dynamic Text { get; }
/// <inheritdoc />
public IStringLocalizer Localizer { get; }
}
/// <summary>
/// Provide the default implementation for <see cref="DynamicStringLocalizer{TResource}" /> service.
/// </summary>
public class DynamicStringLocalizer<TResource> : DynamicStringLocalizer, IDynamicStringLocalizer<TResource>
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicStringLocalizer{TResource}" /> service.
/// </summary>
/// <param name="localizer">The internal <see cref="IStringLocalizer{TResource}" /> service.</param>
/// <exception cref="ArgumentNullException">The <paramref name="localizer" /> is <c>null</c>.</exception>
[UsedImplicitly]
public DynamicStringLocalizer([NotNull] IStringLocalizer<TResource> localizer) : base(localizer)
{
Localizer = localizer;
}
/// <inheritdoc />
public new IStringLocalizer<TResource> Localizer { get; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicStringLocalizerWrapper.cs
================================================
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using Microsoft.Extensions.Localization;
namespace Sakura.AspNetCore.Localization.Internal;
/// <summary>
/// Provide the dynamic style implementation for <see cref="IStringLocalizer" /> object.
/// </summary>
public class DynamicStringLocalizerWrapper : DynamicObject
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicStringLocalizerWrapper" /> object.
/// </summary>
/// <param name="innerLocalizer">The internal <see cref="IStringLocalizer" /> object.</param>
public DynamicStringLocalizerWrapper(IStringLocalizer innerLocalizer)
{
InnerLocalizer = innerLocalizer;
}
/// <summary>
/// Get the internal <see cref="IStringLocalizer" /> service.
/// </summary>
private IStringLocalizer InnerLocalizer { get; }
/// <inheritdoc />
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
result = InnerLocalizer[binder.Name];
return true;
}
/// <inheritdoc />
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
result = InnerLocalizer[binder.Name, args];
return true;
}
/// <inheritdoc />
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
{
if (indexes.Length == 0)
throw new ArgumentException(nameof(indexes), "The length of index array cannot be zero.");
if (indexes[0] is string name)
result = InnerLocalizer[name, indexes.Skip(1).ToArray()];
else
throw new ArgumentException(nameof(indexes), "The first index value must be a string.");
return true;
}
/// <inheritdoc />
public override IEnumerable<string> GetDynamicMemberNames()
{
return InnerLocalizer.GetAllStrings().Select(i => i.Name);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicViewLocalizer.cs
================================================
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace Sakura.AspNetCore.Localization.Internal;
/// <summary>
/// Provide the dynamic style implementation for <see cref="IHtmlLocalizer" /> object.
/// </summary>
public class DynamicViewLocalizer : DynamicHtmlLocalizer, IDynamicViewLocalizer, IViewContextAware
{
/// <summary>
/// Initialize a new instance of <see cref="DynamicViewLocalizer" /> object.
/// </summary>
/// <param name="localizer">The internal <see cref="IViewLocalizer" /> object.</param>
[UsedImplicitly]
public DynamicViewLocalizer(IViewLocalizer localizer)
: base(localizer)
{
Localizer = localizer;
}
/// <inheritdoc />
public new IViewLocalizer Localizer { get; }
/// <inheritdoc />
void IViewContextAware.Contextualize(ViewContext viewContext)
{
if (Localizer is IViewContextAware viewLocalizer)
viewLocalizer.Contextualize(viewContext);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/IDynamicLocalizerWrapper.cs
================================================
using System.Dynamic;
namespace Sakura.AspNetCore.Localization.Internal;
/// <summary>
/// Provide common base interface for dynamic localizer services. This interface is for internal usage only and should
/// not be used in user code.
/// </summary>
public interface IDynamicLocalizerWrapper : IDynamicMetaObjectProvider
{
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Sakura.AspNetCore.DynamicLocalizer.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.6;netcoreapp3.0</TargetFrameworks>
<RootNamespace>Sakura.AspNetCore.Localization</RootNamespace>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>ASP.NET Core MVC Dynamic Localizer Service</Title>
<Authors>Iris Sakura</Authors>
<Company>Iris Sakura</Company>
<Product>Sakura.AspNetCore.Extensions</Product>
<Description>This package provide dynamic style localiazation resource accesing ability.</Description>
<PackageReleaseNotes>Update framework reference usage.</PackageReleaseNotes>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/sgjsakura/AspNetCore</PackageProjectUrl>
<RepositoryUrl>https://github.com/sgjsakura/AspNetCore.git</RepositoryUrl>
<PackageTags>ASP.NET;ASP.NETCore;MVC;MVCCore;Localization</PackageTags>
<Version>2.2.0</Version>
<PackageLicenseFile></PackageLicenseFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup>
<WarningLevel>9999</WarningLevel>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup Condition=" $(TargetFramework) == 'netstandard1.6' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Localization" Version="1.0.0" />
</ItemGroup>
<ItemGroup Condition=" $(TargetFramework) == 'netcoreapp3.0' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
</ItemGroup>
</Project>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/ServiceCollectionExtensions.cs
================================================
using System;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Sakura.AspNetCore.Localization.Internal;
namespace Sakura.AspNetCore.Localization;
/// <summary>
/// Provide extension methods to add services. This class is static.
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// Add default implementation for all dynamic resource accessing services.
/// </summary>
/// <param name="services">The service collection container.</param>
public static void AddDynamicLocalizer([NotNull] this IServiceCollection services)
{
if (services == null)
throw new ArgumentNullException(nameof(services));
services.TryAddTransient<IDynamicViewLocalizer, DynamicViewLocalizer>();
services.TryAddTransient(typeof(IDynamicStringLocalizer<>), typeof(DynamicStringLocalizer<>));
services.TryAddTransient(typeof(IDynamicHtmlLocalizer<>), typeof(DynamicHtmlLocalizer<>));
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Extensions.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Authentication.ExternalCookie", "Sakura.AspNetCore.Authentication.ExternalCookie\Sakura.AspNetCore.Authentication.ExternalCookie.csproj", "{590CF0F1-94D9-452E-850B-F4317948F964}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Messages", "Sakura.AspNetCore.Messages\Sakura.AspNetCore.Messages.csproj", "{0503C0D3-7C16-4197-8A45-55A8D9FAF336}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Messages.Abstractions", "Sakura.AspNetCore.Messages.Abstractions\Sakura.AspNetCore.Messages.Abstractions.csproj", "{376B4F2C-4F5B-45C8-8622-1EF87915CA2D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions", "Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions\Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions.csproj", "{57C6025D-CA1C-47FB-A3E0-14F00E5CA42D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Mvc.Messages", "Sakura.AspNetCore.Mvc.Messages\Sakura.AspNetCore.Mvc.Messages.csproj", "{F33A9546-DCEE-4587-B4C3-6BC7C0A15781}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Mvc.PagedList", "Sakura.AspNetCore.Mvc.PagedList\Sakura.AspNetCore.Mvc.PagedList.csproj", "{074CC00D-46C5-4ACF-8FE8-DA11FA6C62D2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Mvc.TagHelpers", "Sakura.AspNetCore.Mvc.TagHelpers\Sakura.AspNetCore.Mvc.TagHelpers.csproj", "{5CE9F1EB-B73B-424E-96BE-E1ADE49D1A87}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.Mvc.TempDataExtensions", "Sakura.AspNetCore.Mvc.TempDataExtensions\Sakura.AspNetCore.Mvc.TempDataExtensions.csproj", "{5C995A93-2867-4230-BCCB-9F966BAF9BB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.PagedList", "Sakura.AspNetCore.PagedList\Sakura.AspNetCore.PagedList.csproj", "{D6F2F3B1-A8F7-414A-888A-A6F8524D465B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.PagedList.Abstractions", "Sakura.AspNetCore.PagedList.Abstractions\Sakura.AspNetCore.PagedList.Abstractions.csproj", "{A5254FCE-857E-44A3-A161-062358486099}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.PagedList.Async", "Sakura.AspNetCore.PagedList.Async\Sakura.AspNetCore.PagedList.Async.csproj", "{B192C312-8D65-4CDE-9146-A3379FD71F47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.AspNetCore.DynamicLocalizer", "Sakura.AspNetCore.DynamicLocalizer\Sakura.AspNetCore.DynamicLocalizer.csproj", "{A622B3F3-458E-4813-95F9-2AD4BDDC8A49}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sakura.EntityFrameworkCore.FromSqlExtensions", "Sakura.EntityFrameworkCore.FromSqlExtensions\Sakura.EntityFrameworkCore.FromSqlExtensions.csproj", "{56143555-9A12-4FD0-9447-A6831C7FEB17}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sakura.AspNetCore.Mvc.VisualStyles", "Sakura.AspNetCore.Mvc.VisualStyles\Sakura.AspNetCore.Mvc.VisualStyles.csproj", "{79EB3475-55AB-4546-A043-83CFD5DB3723}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{4DB05341-A92F-4FDB-AFC2-6C1FFF0065D4}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{590CF0F1-94D9-452E-850B-F4317948F964}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{590CF0F1-94D9-452E-850B-F4317948F964}.Debug|Any CPU.Build.0 = Debug|Any CPU
{590CF0F1-94D9-452E-850B-F4317948F964}.Release|Any CPU.ActiveCfg = Release|Any CPU
{590CF0F1-94D9-452E-850B-F4317948F964}.Release|Any CPU.Build.0 = Release|Any CPU
{0503C0D3-7C16-4197-8A45-55A8D9FAF336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0503C0D3-7C16-4197-8A45-55A8D9FAF336}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0503C0D3-7C16-4197-8A45-55A8D9FAF336}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0503C0D3-7C16-4197-8A45-55A8D9FAF336}.Release|Any CPU.Build.0 = Release|Any CPU
{376B4F2C-4F5B-45C8-8622-1EF87915CA2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{376B4F2C-4F5B-45C8-8622-1EF87915CA2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{376B4F2C-4F5B-45C8-8622-1EF87915CA2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{376B4F2C-4F5B-45C8-8622-1EF87915CA2D}.Release|Any CPU.Build.0 = Release|Any CPU
{57C6025D-CA1C-47FB-A3E0-14F00E5CA42D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57C6025D-CA1C-47FB-A3E0-14F00E5CA42D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57C6025D-CA1C-47FB-A3E0-14F00E5CA42D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57C6025D-CA1C-47FB-A3E0-14F00E5CA42D}.Release|Any CPU.Build.0 = Release|Any CPU
{F33A9546-DCEE-4587-B4C3-6BC7C0A15781}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F33A9546-DCEE-4587-B4C3-6BC7C0A15781}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F33A9546-DCEE-4587-B4C3-6BC7C0A15781}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F33A9546-DCEE-4587-B4C3-6BC7C0A15781}.Release|Any CPU.Build.0 = Release|Any CPU
{074CC00D-46C5-4ACF-8FE8-DA11FA6C62D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{074CC00D-46C5-4ACF-8FE8-DA11FA6C62D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{074CC00D-46C5-4ACF-8FE8-DA11FA6C62D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{074CC00D-46C5-4ACF-8FE8-DA11FA6C62D2}.Release|Any CPU.Build.0 = Release|Any CPU
{5CE9F1EB-B73B-424E-96BE-E1ADE49D1A87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CE9F1EB-B73B-424E-96BE-E1ADE49D1A87}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CE9F1EB-B73B-424E-96BE-E1ADE49D1A87}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CE9F1EB-B73B-424E-96BE-E1ADE49D1A87}.Release|Any CPU.Build.0 = Release|Any CPU
{5C995A93-2867-4230-BCCB-9F966BAF9BB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C995A93-2867-4230-BCCB-9F966BAF9BB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C995A93-2867-4230-BCCB-9F966BAF9BB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C995A93-2867-4230-BCCB-9F966BAF9BB4}.Release|Any CPU.Build.0 = Release|Any CPU
{D6F2F3B1-A8F7-414A-888A-A6F8524D465B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6F2F3B1-A8F7-414A-888A-A6F8524D465B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6F2F3B1-A8F7-414A-888A-A6F8524D465B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6F2F3B1-A8F7-414A-888A-A6F8524D465B}.Release|Any CPU.Build.0 = Release|Any CPU
{A5254FCE-857E-44A3-A161-062358486099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5254FCE-857E-44A3-A161-062358486099}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5254FCE-857E-44A3-A161-062358486099}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5254FCE-857E-44A3-A161-062358486099}.Release|Any CPU.Build.0 = Release|Any CPU
{B192C312-8D65-4CDE-9146-A3379FD71F47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B192C312-8D65-4CDE-9146-A3379FD71F47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B192C312-8D65-4CDE-9146-A3379FD71F47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B192C312-8D65-4CDE-9146-A3379FD71F47}.Release|Any CPU.Build.0 = Release|Any CPU
{A622B3F3-458E-4813-95F9-2AD4BDDC8A49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A622B3F3-458E-4813-95F9-2AD4BDDC8A49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A622B3F3-458E-4813-95F9-2AD4BDDC8A49}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A622B3F3-458E-4813-95F9-2AD4BDDC8A49}.Release|Any CPU.Build.0 = Release|Any CPU
{56143555-9A12-4FD0-9447-A6831C7FEB17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56143555-9A12-4FD0-9447-A6831C7FEB17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56143555-9A12-4FD0-9447-A6831C7FEB17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56143555-9A12-4FD0-9447-A6831C7FEB17}.Release|Any CPU.Build.0 = Release|Any CPU
{79EB3475-55AB-4546-A043-83CFD5DB3723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79EB3475-55AB-4546-A043-83CFD5DB3723}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79EB3475-55AB-4546-A043-83CFD5DB3723}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79EB3475-55AB-4546-A043-83CFD5DB3723}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {80507D33-E191-4B8A-9100-13E2BB921706}
EndGlobalSection
EndGlobal
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Extensions.sln.DotSettings
================================================
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String></wpf:ResourceDictionary>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Localization.Dictionary/DictionaryStringLocalizer.cs
================================================
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.Extensions.Localization;
namespace Sakura.AspNetCore.Localization
{
/// <summary>
/// Provide localizable resource string from a dictiony.
/// </summary>
public class DictionaryStringLocalizer : IStringLocalizer
{
public IReadOnlyDictionary<string, string> LocalizedStrings { get; set; }
/// <inheritdoc />
public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public IStringLocalizer WithCulture(CultureInfo culture)
{
throw new NotImplementedException();
}
/// <inheritdoc />
LocalizedString IStringLocalizer.this[string name]
{
get
{
var culture = new CultureInfo();
var found = TryFetchStringCore(LocalizedStrings, )
}
}
/// <inheritdoc />
LocalizedString IStringLocalizer.this[string name, params object[] arguments]
{
get { throw new NotImplementedException(); }
}
/// <returns></returns>
private static bool TryFetchStringCore(IReadOnlyDictionary<string, string> data, CultureInfo culture, out string result)
{
do
{
if (data.TryGetValue(culture.Name, out var value))
{
result = value;
return true;
}
culture = culture.Parent;
} while (culture.Equals(culture.Parent));
result = null;
return false;
}
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Localization.Dictionary/Sakura.AspNetCore.Localization.Dictionary.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
<RootNamespace>Sakura.AspNetCore.Localization</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="1.0.0" />
</ItemGroup>
</Project>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/DefaultOperationMessageAccessor.cs
================================================
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.Options;
namespace Sakura.AspNetCore;
/// <summary>
/// Provide the default implementation for <see cref="IOperationMessageAccessor" /> service.
/// </summary>
public class DefaultOperationMessageAccessor : IOperationMessageAccessor
{
/// <summary>
/// Initialize a new service instance with required services.
/// </summary>
/// <param name="httpContextAccessor">The <see cref="IHttpContextAccessor" /> service.</param>
/// <param name="tempDataFactory">The TempData dictionary factory in the context.</param>
/// <param name="options">The <see cref="OperationMessageOptions" /> instance used to configure the accessor.</param>
public DefaultOperationMessageAccessor(IHttpContextAccessor httpContextAccessor,
ITempDataDictionaryFactory tempDataFactory, IOptions<OperationMessageOptions> options)
{
Options = options.Value;
TempData = tempDataFactory.GetTempData(httpContextAccessor.HttpContext);
}
/// <summary>
/// Get the ASP.NET TempData dictionary in the context.
/// </summary>
[PublicAPI]
protected ITempDataDictionary TempData { get; }
/// <summary>
/// Get the options for this accessor.
/// </summary>
[PublicAPI]
protected OperationMessageOptions Options { get; }
/// <summary>
/// Get the collection to store all messages in the current execution context.
/// </summary>
/// <exception cref="InvalidOperationException">
/// The configured TempDataKeyName is <c>null</c>; Or, the temp data dictionary
/// already contains an value associated with the key used for operation message, however the value cannot be converted
/// into <see cref="ICollection{T}" /> type.
/// </exception>
public ICollection<OperationMessage> Messages
{
get
{
// Retrieve and check the key
var key = Options.TempDataKeyName;
if (key == null)
throw new InvalidOperationException(
"The TempDataKeyName property in the configured OperationMessageOptions instance cannot be null。");
ICollection<OperationMessage> result = null;
// Retrieve the data and convert to the collection type
if (TempData.TryGetValue(key, out var value))
{
result = value as ICollection<OperationMessage>;
// Check type and raise exception
if (result == null && !Options.AutomaticOverwriteOnTypeError)
throw new InvalidOperationException(
$"TempData has an value with the key name '{key}', however it cannot be converted to ICollection<OperationMessage> type.");
}
// Automatically create a new collection when the valuect is not existed or cannot be converted to the target type
if (result == null)
{
result = new List<OperationMessage>();
TempData[key] = result;
}
return result;
}
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/OperationMessageOptions.cs
================================================
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
namespace Sakura.AspNetCore;
/// <summary>
/// Provide the configuration options for operation message services.
/// </summary>
public class OperationMessageOptions
{
/// <summary>
/// Define the default value for the <see cref="TempDataKeyName" /> property. This field is constant.
/// </summary>
[PublicAPI] public const string DefaultTempDataKeyName = "ASP_OperationMessages";
/// <summary>
/// Get or set the key used to store the message collections in TempData dictionary. This key must not be used in any
/// other manner. The default value of this property is <see cref="DefaultTempDataKeyName" />.
/// </summary>
[PublicAPI]
public string TempDataKeyName { get; set; } = DefaultTempDataKeyName;
/// <summary>
/// Get of set a value that control the behavior when there is an value stored associated with the key defined as
/// <see cref="TempDataKeyName" /> but it cannot be converted into <see cref="ICollection{T}" /> type. If the property
/// is set to <c>true</c>, the original value will be automatically discarded and replaced with a new instance of
/// <see cref="ICollection{OperationMessage}" /> type. Otherwise, <see cref="InvalidOperationException" /> will be
/// threw.
/// </summary>
[PublicAPI]
public bool AutomaticOverwriteOnTypeError { get; set; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/OperationMessageServiceCollectionExtensions.cs
================================================
using System;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Sakura.AspNetCore;
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
/// Provide extension method for add or configure the operation message service. This class is static.
/// </summary>
[PublicAPI]
public static class OperationMessageServiceCollectionExtensions
{
/// <summary>
/// Add the operation message services to the specified service container.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection" /> to add the service to.</param>
/// <param name="configureOptions">A optional action for configure this service.</param>
/// <returns>The <paramref name="services" /> parameter.</returns>
/// <exception cref="ArgumentNullException"><paramref name="services" /> is <c>null</c>.</exception>
public static IServiceCollection AddOperationMessageAccessor(this IServiceCollection services,
Action<OperationMessageOptions>? configureOptions = null)
{
// Check argument
if (services == null)
throw new ArgumentNullException(nameof(services));
// Try to add service
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
services.TryAddScoped<IOperationMessageAccessor, DefaultOperationMessageAccessor>();
// Configure the service
if (configureOptions != null)
services.Configure(configureOptions);
return services;
}
/// <summary>
/// Configure the options for <see cref="IOperationMessageAccessor" /> service.
/// </summary>
/// <param name="services">The service container to store the service configuration.</param>
/// <param name="configureOptions">A action for configuring the service.</param>
/// <returns>The <paramref name="services" /> parameter.</returns>
/// <exception cref="ArgumentNullException">
/// Either <paramref name="services" /> or <paramref name="configureOptions" /> is
/// <c>null</c>.
/// </exception>
public static IServiceCollection ConfigureOperationMessages(this IServiceCollection services,
Action<OperationMessageOptions> configureOptions)
{
// Check argument
if (services == null)
throw new ArgumentNullException(nameof(services));
if (configureOptions == null)
throw new ArgumentNullException(nameof(configureOptions));
services.Configure(configureOptions);
return services;
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/Sakura.AspNetCore.Messages.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>This library contains the default implementation for operation message services for ASP.NET Core projects.</Description>
<AssemblyTitle>ASP.NET Core Operation Message Core Library</AssemblyTitle>
<Authors>Iris Sakura</Authors>
<TargetFrameworks>netstandard1.6;net451;netcoreapp3.0</TargetFrameworks>
<AssemblyName>Sakura.AspNetCore.Messages</AssemblyName>
<PackageId>Sakura.AspNetCore.Messages</PackageId>
<PackageTags>ASP.NET;ASP.NETCore;Message;Messages</PackageTags>
<PackageReleaseNotes>Update to support ASP.NET Core 3.0</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/sgjsakura/AspNetCore</PackageProjectUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<RepositoryUrl>https://github.com/sgjsakura/AspNetCore.git</RepositoryUrl>
<Version>1.2.0</Version>
<RootNamespace>Sakura.AspNetCore</RootNamespace>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Sakura.AspNetCore.Messages.Abstractions\Sakura.AspNetCore.Messages.Abstractions.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp3.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="1.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
</Project>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/IOperationMessageAccessor.cs
================================================
using System.Collections.Generic;
namespace Sakura.AspNetCore;
/// <summary>
/// Provide the service for getting the messages from the current execution context.
/// </summary>
public interface IOperationMessageAccessor
{
/// <summary>
/// Get all the messages in the current context. If no messages are currently set, this property will return an empty
/// collection.
/// </summary>
ICollection<OperationMessage> Messages { get; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessage.cs
================================================
using JetBrains.Annotations;
using Microsoft.AspNetCore.Html;
namespace Sakura.AspNetCore;
/// <summary>
/// Represent as an operation message.
/// </summary>
[PublicAPI]
public class OperationMessage
{
/// <summary>
/// Initialize a new instance of operation message.
/// </summary>
public OperationMessage()
{
}
/// <summary>
/// Initialize a new instance of operation message with the specified information.
/// </summary>
/// <param name="level">The level of the message.</param>
/// <param name="title">The title of the message.</param>
/// <param name="description">The detailed description of the message. The default value of this parameter is <c>null</c>.</param>
public OperationMessage(
OperationMessageLevel level,
[LocalizationRequired] IHtmlContent? title,
[LocalizationRequired] IHtmlContent? description = null)
{
Level = level;
Title = title;
Description = description;
}
/// <summary>
/// Get or set the detailed description of the message.
/// </summary>
[LocalizationRequired]
public IHtmlContent? Description { get; set; }
/// <summary>
/// Get or set the level of the message.
/// </summary>
public OperationMessageLevel Level { get; set; }
/// <summary>
/// Get or set the title of the message.
/// </summary>
[LocalizationRequired]
public IHtmlContent? Title { get; set; }
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessageExtensions.cs
================================================
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Html;
namespace Sakura.AspNetCore;
/// <summary>
/// Provide extension method for adding messages. This class is static.
/// </summary>
[PublicAPI]
public static class OperationMessageExtensions
{
/// <summary>
/// Add a new message into the message collection.
/// </summary>
/// <param name="messageAccessor">The collection of messages to be adding the new message.</param>
/// <param name="level">The level of the new message.</param>
/// <param name="title">The title of the new message.</param>
/// <param name="description">The detailed description of the new message.</param>
/// <returns>The newly added <see cref="OperationMessage" /> object.</returns>
/// <exception cref="ArgumentNullException"><paramref name="messageAccessor" /> is <c>null</c>.</exception>
public static OperationMessage Add([NotNull] this IOperationMessageAccessor messageAccessor,
OperationMessageLevel level, [LocalizationRequired] IHtmlContent? title,
[LocalizationRequired] IHtmlContent? description = null)
{
if (messageAccessor == null)
throw new ArgumentNullException(nameof(messageAccessor));
var item = new OperationMessage(level, title, description);
messageAccessor.Messages.Add(item);
return item;
}
/// <summary>
/// Add a new message into the message collection.
/// </summary>
/// <param name="messageAccessor">The collection of messages to be adding the new message.</param>
/// <param name="level">The level of the new message.</param>
/// <param name="title">The title of the new message.</param>
/// <param name="description">The detailed description of the new message.</param>
/// <returns>The newly added <see cref="OperationMessage" /> object.</returns>
/// <exception cref="ArgumentNullException"><paramref name="messageAccessor" /> is <c>null</c>.</exception>
public static OperationMessage Add([NotNull] this IOperationMessageAccessor messageAccessor,
OperationMessageLevel level, [LocalizationRequired] string? title,
[LocalizationRequired] string? description = null)
{
if (messageAccessor == null)
throw new ArgumentNullException(nameof(messageAccessor));
var item = new OperationMessage(level, EncodeToHtml(title), EncodeToHtml(description));
messageAccessor.Messages.Add(item);
return item;
}
private static IHtmlContent EncodeToHtml(string value)
{
return new HtmlContentBuilder().Append(value);
}
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessageLevel.cs
================================================
namespace Sakura.AspNetCore;
/// <summary>
/// Define the level of messages.
/// </summary>
/// <seealso cref="OperationMessage.Level" />
public enum OperationMessageLevel
{
/// <summary>
/// The level of the message is not classified.
/// </summary>
None = 0,
/// <summary>
/// The message is in debug level.
/// </summary>
Debug,
/// <summary>
/// The message is in verbose level.
/// </summary>
Verbose,
/// <summary>
/// The message is in information level, which means it can be ignored safely.
/// </summary>
Info,
/// <summary>
/// The message is in success level, it represent as a successfully operation result.
/// </summary>
Success,
/// <summary>
/// The message is in warning level, it represents as an non-critical incorrect runtime behavior.
/// </summary>
Warning,
/// <summary>
/// The message is in error level, it means there is some problem during the system executing.
/// </summary>
Error,
/// <summary>
/// The message is in critical level, the system may be badly broken and cannot continue for execution.
/// </summary>
Critical
}
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/Sakura.AspNetCore.Messages.Abstractions.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>This library contains the operation message type definitions and service interfaces for ASP.NET Core projects.</Description>
<AssemblyTitle>ASP.NET Core Operation Message Abstraction Layer</AssemblyTitle>
<VersionPrefix>1.0.1</VersionPrefix>
<Authors>Iris Sakura</Authors>
<TargetFrameworks>netstandard1.0;netcoreapp3.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Sakura.AspNetCore.Messages.Abstractions</AssemblyName>
<PackageId>Sakura.AspNetCore.Messages.Abstractions</PackageId>
<PackageTags>ASP.NET;ASP.NETCore;Message;Messages</PackageTags>
<PackageReleaseNotes>Fixed security problem using HtmlString.</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/sgjsakura/AspNetCore</PackageProjectUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<RepositoryUrl>https://github.com/sgjsakura/AspNetCore.git</RepositoryUrl>
<Version>2.0.1</Version>
<RootNamespace>Sakura.AspNetCore</RootNamespace>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework) == 'netstandard1.0'">
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="1.0.0" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework) == 'netcoreapp3.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
</ItemGroup>
</Project>
================================================
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/ActionResultException.cs
================================================
using System;
using System.Net;
using Microsoft.AspNetCore.Mvc;
namespace Sakura.AspNetCore.Mvc;
/// <summary>
/// Represent as a special exception used to return an <see cref="IActionResult" /> directly during the MVC executing
/// pipeline.
/// </summary>
/// <remarks>
/// To enable this special action, please mark <see cref="EnableActionResultExceptionAttribute" /> on a controller or
/// action, or register it globally in your MVC configuration code.
/// </remarks>
public class ActionResultException : Exception
{
/// <summary>
/// Initialize a new <see cref="ActionResultException" /> with specified <see cref="IActionResult" />.
/// </summary>
/// <param name="result">The <see cref="IActionResult" /> object which will be returned when this exception is handled.</param>
public ActionResultException(IActionResult result)
{
Result = result ?? throw new ArgumentNullException(nameof(result));
}
/// <summary>
/// Initialize a new <see cref="ActionResultException" /> with specified <see cref="IActionResult" /> and message.
/// </summary>
/// <param name="message">The message for this exception.</param>
/// <param name="result">The <see cref="IActionResult" /> object which will be returned when this exception is handled.</param>
public ActionResultException(string message, IActionResult result) : base(message)
{
Result = result ?? throw new ArgumentNullException(nameof(result));
}
/// <summary>
/// Initialize a new <see cref="ActionResultException" /> with specified <see cref="IActionResult" /> and information.
/// </summary>
/// <param name="message">The message for this exception.</param>
/// <param name="inner">The inner exception for this exception.</param>
/// <param name="result">The <see cref="IActionResult" /> object which will be returned when this exception is handled.</param>
public ActionResultException(string message, Exception inner, IActionResult result) : base(message, inner)
{
Result = result ?? throw new ArgumentNullException(nameof(result));
}
/// <summary>
/// Get or the result will be returned to the MVC pipeline when this exception is handled.
/// </summary>
public IActionResult Result
gitextract_s1v18kb7/ ├── .gitattributes ├── .gitignore ├── LICENSE.txt ├── PagerDemo.md ├── PagerDemov1.md ├── README.md ├── Sakura.AspNetCore.Extensions/ │ ├── Directory.Build.props │ ├── Sakura.AspNetCore.AsyncPagedList/ │ │ ├── AsyncCacheable.cs │ │ ├── AsyncPagedList.cs │ │ ├── IAsyncPagedList.cs │ │ ├── PagedListCreationHelper.cs │ │ ├── Properties/ │ │ │ ├── Annotations.cs │ │ │ └── AssemblyInfo.cs │ │ └── Sakura.AspNetCore.AsyncPagedList.csproj │ ├── Sakura.AspNetCore.Authentication.ExternalCookie/ │ │ ├── ApplicationBuilderExtensions.cs │ │ ├── ExternalSecurityStampValidator.cs │ │ ├── ExternalSignInManager.Net1.cs │ │ ├── ExternalSignInManager.Net2.cs │ │ ├── ExternalSignInManager.cs │ │ ├── IdentityHelper.cs │ │ ├── Sakura.AspNetCore.Authentication.ExternalCookie.csproj │ │ └── ServiceCollectionExtensions.cs │ ├── Sakura.AspNetCore.DynamicLocalizer/ │ │ ├── IDynamicHtmlLocalizer.cs │ │ ├── IDynamicStringLocalizer.cs │ │ ├── IDynamicViewLocalizer.cs │ │ ├── Internal/ │ │ │ ├── DynamicHtmlLocalizer.cs │ │ │ ├── DynamicHtmlLocalizerWrapper.cs │ │ │ ├── DynamicHtmlTextLocalizerWrapper.cs │ │ │ ├── DynamicStringLocalizer.cs │ │ │ ├── DynamicStringLocalizerWrapper.cs │ │ │ ├── DynamicViewLocalizer.cs │ │ │ └── IDynamicLocalizerWrapper.cs │ │ ├── Sakura.AspNetCore.DynamicLocalizer.csproj │ │ └── ServiceCollectionExtensions.cs │ ├── Sakura.AspNetCore.Extensions.sln │ ├── Sakura.AspNetCore.Extensions.sln.DotSettings │ ├── Sakura.AspNetCore.Localization.Dictionary/ │ │ ├── DictionaryStringLocalizer.cs │ │ └── Sakura.AspNetCore.Localization.Dictionary.csproj │ ├── Sakura.AspNetCore.Messages/ │ │ ├── DefaultOperationMessageAccessor.cs │ │ ├── OperationMessageOptions.cs │ │ ├── OperationMessageServiceCollectionExtensions.cs │ │ └── Sakura.AspNetCore.Messages.csproj │ ├── Sakura.AspNetCore.Messages.Abstractions/ │ │ ├── IOperationMessageAccessor.cs │ │ ├── OperationMessage.cs │ │ ├── OperationMessageExtensions.cs │ │ ├── OperationMessageLevel.cs │ │ └── Sakura.AspNetCore.Messages.Abstractions.csproj │ ├── Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/ │ │ ├── ActionResultException.cs │ │ ├── EnableActionResultExceptionAttribute.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions.csproj │ │ └── ServiceExtensions.cs │ ├── Sakura.AspNetCore.Mvc.Messages/ │ │ ├── CssClassBasedIconMapper.cs │ │ ├── IIconMapper.cs │ │ ├── IIconToCssClassMapper.cs │ │ ├── IOperationMessageHtmlGenerator.cs │ │ ├── IOperationMessageLevelToStyleMapper.cs │ │ ├── Implementations/ │ │ │ ├── Bootstrap5AlertMessageContentLayout.cs │ │ │ ├── Bootstrap5AlertMessageHtmlGenerator.cs │ │ │ ├── Bootstrap5AlertMessageHtmlGeneratorOptions.cs │ │ │ ├── Bootstrap5MessagesServiceBuilder.cs │ │ │ ├── Bootstrap5ToastMessageHtmlGenerator.cs │ │ │ ├── Bootstrap5ToastMessageHtmlGeneratorOptions.cs │ │ │ ├── BootstrapBuilderExtensions.cs │ │ │ ├── BootstrapIconCssClassMapperOptions.cs │ │ │ ├── BootstrapIconMapper.cs │ │ │ ├── BootstrapIconStyle.cs │ │ │ ├── DefaultBootstrap5OperationMessageLevelToStyleMapper.cs │ │ │ ├── DefaultBootstrapIconCssClassMapper.cs │ │ │ ├── HorizontalAlignment.cs │ │ │ ├── IBootstrapIconServiceBuilder.cs │ │ │ ├── Utility.cs │ │ │ └── VerticalAlignment.cs │ │ ├── MessageTagHelper.cs │ │ ├── OperationMessageServiceBuilder.cs │ │ ├── Sakura.AspNetCore.Mvc.Messages.csproj │ │ ├── ServiceCollectionExtensions.cs │ │ └── StaticIIconToCssClassMapper.cs │ ├── Sakura.AspNetCore.Mvc.PagedList/ │ │ ├── FirstAndLastPagerItemActiveMode.cs │ │ ├── Generators/ │ │ │ ├── BaseUriLinkGenerator.cs │ │ │ ├── CustomHtmlContentGenerator.cs │ │ │ ├── CustomLinkGenerator.cs │ │ │ ├── CustomQueryStringLinkGenerator.cs │ │ │ ├── CustomQueryValueLinkGenerator.cs │ │ │ ├── CustomStringContentGenerator.cs │ │ │ ├── DisabledLinkGenerator.cs │ │ │ ├── FormattedLinkGenerator.cs │ │ │ ├── FormattedQueryValueLinkGenerator.cs │ │ │ ├── FormattedStringContentGenerator.cs │ │ │ ├── FragmentLinkGenerator.cs │ │ │ ├── QueryStringLinkGenerator.cs │ │ │ ├── QueryValueLinkGenerator.cs │ │ │ ├── SimpleLinkGenerator.cs │ │ │ ├── SimpleQueryValueLinkGenerator.cs │ │ │ ├── SimpleStringContentGenerator.cs │ │ │ └── StringContentGenerator.cs │ │ ├── IPagerItemContentGenerator.cs │ │ ├── IPagerItemLinkGenerator.cs │ │ ├── Internal/ │ │ │ ├── BootstrapPagerHtmlGenerator.cs │ │ │ ├── DefaultPagerGenerator.cs │ │ │ ├── DefaultPagerListGenerator.cs │ │ │ ├── DefaultPagerRenderingListGenerator.cs │ │ │ ├── IPagerGenerator.cs │ │ │ ├── IPagerHtmlGenerator.cs │ │ │ ├── IPagerListGenerator.cs │ │ │ ├── IPagerRenderingListGenerator.cs │ │ │ ├── PagerGenerationContext.cs │ │ │ ├── PagerItem.cs │ │ │ ├── PagerItemContentGeneratorConverter.cs │ │ │ ├── PagerItemLinkGeneratorConverter.cs │ │ │ ├── PagerItemType.cs │ │ │ ├── PagerLayoutConverter.cs │ │ │ ├── PagerList.cs │ │ │ ├── PagerRenderingItem.cs │ │ │ ├── PagerRenderingItemState.cs │ │ │ ├── PagerRenderingList.cs │ │ │ ├── StringToHtmlContentConverter.cs │ │ │ └── Utility.cs │ │ ├── PagerGenerationMode.cs │ │ ├── PagerItemContentGenerators.cs │ │ ├── PagerItemGenerationContext.cs │ │ ├── PagerItemLinkGenerators.cs │ │ ├── PagerItemMode.cs │ │ ├── PagerItemOptions.cs │ │ ├── PagerItemOptionsSet.cs │ │ ├── PagerLayout.cs │ │ ├── PagerLayoutElement.cs │ │ ├── PagerLayouts.cs │ │ ├── PagerOptions.cs │ │ ├── PagerOptionsExtensions.cs │ │ ├── Sakura.AspNetCore.Mvc.PagedList.csproj │ │ ├── ServiceCollectionExtensions.cs │ │ ├── SpecialPagerItemInactiveBehavior.cs │ │ └── TagHelpers/ │ │ ├── AjaxOptions.cs │ │ ├── AjaxUpdateMode.cs │ │ ├── PagerTagHelper.cs │ │ └── TagHelperUtility.cs │ ├── Sakura.AspNetCore.Mvc.TagHelpers/ │ │ ├── AuthorizeAttributeTagHelper.cs │ │ ├── AuthorizeTagHelper.cs │ │ ├── AuthorizeTagHelperBase.cs │ │ ├── ConditionalClassTagHelper.cs │ │ ├── DisplayTextTagHelper.cs │ │ ├── EnumForSelectTagHelper.cs │ │ ├── EnumOptionValueSource.cs │ │ ├── EnumSelectTagHelper.cs │ │ ├── EnumTypeSelectTagHelper.cs │ │ ├── EnumValueTextHelper.cs │ │ ├── FlagsEnumInputTagHelper.cs │ │ ├── FlagsEnumModelBinder.cs │ │ ├── FlagsEnumModelBinderProvider.cs │ │ ├── FlagsEnumModelBinderServiceCollectionExtensions.cs │ │ ├── HtmlGeneratorHelper.cs │ │ ├── IdFormatTagHelper.cs │ │ ├── OptionLabelPosition.cs │ │ ├── PartialViewItemTagHelper.cs │ │ ├── ReflectionHelper.cs │ │ ├── ResourceHelper.cs │ │ ├── Sakura.AspNetCore.Mvc.TagHelpers.csproj │ │ ├── SelectOptionLabelTagHelper.cs │ │ ├── SelectValueOptionTagHelper.cs │ │ ├── SelectValueTagHelper.cs │ │ ├── TextSource.cs │ │ └── ViewDataExtensions.cs │ ├── Sakura.AspNetCore.Mvc.TempDataExtensions/ │ │ ├── EnhancedSessionStateTempDataProvider.cs │ │ ├── HtmlContentConverter.NetCoreApp3.cs │ │ ├── HtmlContentConverter.cs │ │ ├── IObjectSerializer.cs │ │ ├── JsonObjectSerializer.cs │ │ ├── Sakura.AspNetCore.Mvc.TempDataExtensions.csproj │ │ ├── SerializedObjectInfo.cs │ │ ├── ServiceCollectionExtensions.cs │ │ ├── TempDataSerializationOptions.cs │ │ └── TypedJsonTempDataSerializer.cs │ ├── Sakura.AspNetCore.Mvc.VisualStyles/ │ │ ├── Sakura.AspNetCore.Mvc.VisualStyles.csproj │ │ ├── VisualStyle.cs │ │ ├── VisualStyleMatchResult.cs │ │ ├── VisualStyleMatchType.cs │ │ ├── VisualStyleOptions.cs │ │ └── VisualStyleService.cs │ ├── Sakura.AspNetCore.PagedList/ │ │ ├── CacheMode.cs │ │ ├── Cacheable.cs │ │ ├── DisableAutoRefreshController.cs │ │ ├── DynamicPagedList.cs │ │ ├── DynamicPagedListBase.cs │ │ ├── DynamicPagedListCacheOptions.cs │ │ ├── DynamicQueryablePagedList.cs │ │ ├── ICacheControl.cs │ │ ├── PagedList.cs │ │ ├── PagedListCreationHelper.cs │ │ └── Sakura.AspNetCore.PagedList.csproj │ ├── Sakura.AspNetCore.PagedList.Abstractions/ │ │ ├── DynamicPagedListExtensions.cs │ │ ├── IDynamicPagedList.cs │ │ ├── IPagedList.cs │ │ ├── PagedListExtensions.cs │ │ └── Sakura.AspNetCore.PagedList.Abstractions.csproj │ ├── Sakura.AspNetCore.PagedList.Async/ │ │ ├── AsyncPagedListCreationHelper.cs │ │ └── Sakura.AspNetCore.PagedList.Async.csproj │ └── Sakura.EntityFrameworkCore.FromSqlExtensions/ │ ├── DbContextFromSqlExtensions.cs │ └── Sakura.EntityFrameworkCore.FromSqlExtensions.csproj └── TagHelperDemo.md
SYMBOL INDEX (704 symbols across 172 files)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/AsyncCacheable.cs
class AsyncCacheable (line 11) | public class AsyncCacheable<T> : ICacheControl
method AsyncCacheable (line 31) | public AsyncCacheable(Func<Task<T>> getDataCallback, Func<T, T> cacheC...
method GetDataAsync (line 71) | public async Task<T> GetDataAsync()
method ReloadAsync (line 94) | public async Task ReloadAsync()
method CacheAsync (line 103) | public async Task CacheAsync()
method UncacheAsync (line 115) | public Task UncacheAsync()
method DefaultCacheCallback (line 132) | private static T DefaultCacheCallback(T item) => item;
method GetDataDirectlyAsync (line 138) | public Task<T> GetDataDirectlyAsync() => GetDataCallback();
method NotifyDismissAsync (line 143) | public async Task NotifyDismissAsync()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/AsyncPagedList.cs
class AsyncPagedList (line 8) | public class AsyncPagedList<T> : IAsyncEnumerable<T>
method AsyncPagedList (line 19) | public AsyncPagedList(IAsyncEnumerable<T> source, int pageSize, int pa...
method GetTotalCountAsync (line 73) | protected virtual Task<int> GetTotalCountAsync() => Source.Count();
method GetCurrentPageAsync (line 79) | protected virtual IAsyncEnumerable<T> GetCurrentPageAsync()
method CacheDataAsync (line 92) | protected virtual async Task<IAsyncEnumerable<T>> CacheDataAsync(IAsyn...
method GetTotalCountAsync (line 133) | public Task<int> GetTotalCountAsync() => TotalCountCacheInternal.GetDa...
method GetEnumerator (line 252) | public IAsyncEnumerator<T> GetEnumerator()
method GetAsync (line 263) | public Task<T> GetAsync(int index) => CurrentPage.ElementAt(index);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/IAsyncPagedList.cs
type IAsyncPagedList (line 6) | public interface IAsyncPagedList<T> : IAsyncEnumerable<T>
method CountAsync (line 8) | Task<int> CountAsync();
method TotalCountAsync (line 9) | Task<int> TotalCountAsync();
method GetAsync (line 14) | Task<T> GetAsync(int index);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/PagedListCreationHelper.cs
class PagedListCreationHelper (line 12) | [PublicAPI]
method ToPagedListAsync (line 23) | public static async Task<PagedList<IAsyncEnumerable<T>, T>> ToPagedLis...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/Properties/Annotations.cs
class CanBeNullAttribute (line 51) | [AttributeUsage(
class NotNullAttribute (line 70) | [AttributeUsage(
class ItemNotNullAttribute (line 84) | [AttributeUsage(
class ItemCanBeNullAttribute (line 97) | [AttributeUsage(
class ImplicitNotNullAttribute (line 109) | [AttributeUsage(
class StringFormatMethodAttribute (line 131) | [AttributeUsage(
method StringFormatMethodAttribute (line 140) | public StringFormatMethodAttribute([NotNull] string formatParameterName)
class ValueProviderAttribute (line 153) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property |...
method ValueProviderAttribute (line 157) | public ValueProviderAttribute([NotNull] string name)
class InvokerParameterNameAttribute (line 179) | [AttributeUsage(AttributeTargets.Parameter)]
class NotifyPropertyChangedInvocatorAttribute (line 242) | [AttributeUsage(AttributeTargets.Method)]
method NotifyPropertyChangedInvocatorAttribute (line 246) | public NotifyPropertyChangedInvocatorAttribute()
method NotifyPropertyChangedInvocatorAttribute (line 250) | public NotifyPropertyChangedInvocatorAttribute([NotNull] string parame...
class ContractAnnotationAttribute (line 314) | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
method ContractAnnotationAttribute (line 318) | public ContractAnnotationAttribute([NotNull] string contract)
method ContractAnnotationAttribute (line 323) | public ContractAnnotationAttribute([NotNull] string contract, bool for...
class LocalizationRequiredAttribute (line 346) | [AttributeUsage(AttributeTargets.All)]
method LocalizationRequiredAttribute (line 350) | public LocalizationRequiredAttribute() : this(true)
method LocalizationRequiredAttribute (line 354) | public LocalizationRequiredAttribute(bool required)
class CannotApplyEqualityOperatorAttribute (line 384) | [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class | At...
class BaseTypeRequiredAttribute (line 403) | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
method BaseTypeRequiredAttribute (line 408) | public BaseTypeRequiredAttribute([NotNull] Type baseType)
class UsedImplicitlyAttribute (line 421) | [AttributeUsage(AttributeTargets.All)]
method UsedImplicitlyAttribute (line 425) | public UsedImplicitlyAttribute()
method UsedImplicitlyAttribute (line 430) | public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags)
method UsedImplicitlyAttribute (line 435) | public UsedImplicitlyAttribute(ImplicitUseTargetFlags targetFlags)
method UsedImplicitlyAttribute (line 440) | public UsedImplicitlyAttribute(ImplicitUseKindFlags useKindFlags, Impl...
class MeansImplicitUseAttribute (line 454) | [AttributeUsage(AttributeTargets.Class | AttributeTargets.GenericParamet...
method MeansImplicitUseAttribute (line 458) | public MeansImplicitUseAttribute()
method MeansImplicitUseAttribute (line 463) | public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags)
method MeansImplicitUseAttribute (line 468) | public MeansImplicitUseAttribute(ImplicitUseTargetFlags targetFlags)
method MeansImplicitUseAttribute (line 473) | public MeansImplicitUseAttribute(ImplicitUseKindFlags useKindFlags, Im...
type ImplicitUseKindFlags (line 486) | [Flags]
type ImplicitUseTargetFlags (line 511) | [Flags]
class PublicAPIAttribute (line 528) | [MeansImplicitUse(ImplicitUseTargetFlags.WithMembers)]
method PublicAPIAttribute (line 532) | public PublicAPIAttribute()
method PublicAPIAttribute (line 536) | public PublicAPIAttribute([NotNull] string comment)
class InstantHandleAttribute (line 550) | [AttributeUsage(AttributeTargets.Parameter)]
class PureAttribute (line 569) | [AttributeUsage(AttributeTargets.Method)]
class MustUseReturnValueAttribute (line 578) | [AttributeUsage(AttributeTargets.Method)]
method MustUseReturnValueAttribute (line 582) | public MustUseReturnValueAttribute()
method MustUseReturnValueAttribute (line 586) | public MustUseReturnValueAttribute([NotNull] string justification)
class ProvidesContextAttribute (line 612) | [AttributeUsage(
class PathReferenceAttribute (line 624) | [AttributeUsage(AttributeTargets.Parameter)]
method PathReferenceAttribute (line 628) | public PathReferenceAttribute()
method PathReferenceAttribute (line 632) | public PathReferenceAttribute([NotNull, PathReference] string basePath)
class SourceTemplateAttribute (line 664) | [AttributeUsage(AttributeTargets.Method)]
class MacroAttribute (line 698) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method, Al...
class AspMvcAreaMasterLocationFormatAttribute (line 726) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method AspMvcAreaMasterLocationFormatAttribute (line 730) | public AspMvcAreaMasterLocationFormatAttribute([NotNull] string format)
class AspMvcAreaPartialViewLocationFormatAttribute (line 739) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method AspMvcAreaPartialViewLocationFormatAttribute (line 743) | public AspMvcAreaPartialViewLocationFormatAttribute([NotNull] string f...
class AspMvcAreaViewLocationFormatAttribute (line 752) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method AspMvcAreaViewLocationFormatAttribute (line 756) | public AspMvcAreaViewLocationFormatAttribute([NotNull] string format)
class AspMvcMasterLocationFormatAttribute (line 765) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method AspMvcMasterLocationFormatAttribute (line 769) | public AspMvcMasterLocationFormatAttribute(string format)
class AspMvcPartialViewLocationFormatAttribute (line 777) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method AspMvcPartialViewLocationFormatAttribute (line 781) | public AspMvcPartialViewLocationFormatAttribute([NotNull] string format)
class AspMvcViewLocationFormatAttribute (line 790) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method AspMvcViewLocationFormatAttribute (line 794) | public AspMvcViewLocationFormatAttribute([NotNull] string format)
class AspMvcActionAttribute (line 809) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
method AspMvcActionAttribute (line 813) | public AspMvcActionAttribute()
method AspMvcActionAttribute (line 817) | public AspMvcActionAttribute([NotNull] string anonymousProperty)
class AspMvcAreaAttribute (line 831) | [AttributeUsage(AttributeTargets.Parameter)]
method AspMvcAreaAttribute (line 835) | public AspMvcAreaAttribute()
method AspMvcAreaAttribute (line 839) | public AspMvcAreaAttribute([NotNull] string anonymousProperty)
class AspMvcControllerAttribute (line 854) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
method AspMvcControllerAttribute (line 858) | public AspMvcControllerAttribute()
method AspMvcControllerAttribute (line 862) | public AspMvcControllerAttribute([NotNull] string anonymousProperty)
class AspMvcMasterAttribute (line 875) | [AttributeUsage(AttributeTargets.Parameter)]
class AspMvcModelTypeAttribute (line 885) | [AttributeUsage(AttributeTargets.Parameter)]
class AspMvcPartialViewAttribute (line 897) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
class AspMvcSuppressViewErrorAttribute (line 906) | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
class AspMvcDisplayTemplateAttribute (line 917) | [AttributeUsage(AttributeTargets.Parameter)]
class AspMvcEditorTemplateAttribute (line 928) | [AttributeUsage(AttributeTargets.Parameter)]
class AspMvcTemplateAttribute (line 939) | [AttributeUsage(AttributeTargets.Parameter)]
class AspMvcViewAttribute (line 951) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
class AspMvcViewComponentAttribute (line 961) | [AttributeUsage(AttributeTargets.Parameter)]
class AspMvcViewComponentViewAttribute (line 971) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
class AspMvcActionSelectorAttribute (line 990) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property)]
class HtmlElementAttributesAttribute (line 996) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property |...
method HtmlElementAttributesAttribute (line 1000) | public HtmlElementAttributesAttribute()
method HtmlElementAttributesAttribute (line 1004) | public HtmlElementAttributesAttribute([NotNull] string name)
class HtmlAttributeValueAttribute (line 1013) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | At...
method HtmlAttributeValueAttribute (line 1017) | public HtmlAttributeValueAttribute([NotNull] string name)
class RazorSectionAttribute (line 1031) | [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)]
class CollectionAccessAttribute (line 1041) | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor |...
method CollectionAccessAttribute (line 1045) | public CollectionAccessAttribute(CollectionAccessType collectionAccess...
type CollectionAccessType (line 1053) | [Flags]
class AssertionMethodAttribute (line 1074) | [AttributeUsage(AttributeTargets.Method)]
class AssertionConditionAttribute (line 1085) | [AttributeUsage(AttributeTargets.Parameter)]
method AssertionConditionAttribute (line 1089) | public AssertionConditionAttribute(AssertionConditionType conditionType)
type AssertionConditionType (line 1101) | internal enum AssertionConditionType
class TerminatesProgramAttribute (line 1120) | [Obsolete("Use [ContractAnnotation('=> halt')] instead")]
class LinqTunnelAttribute (line 1132) | [AttributeUsage(AttributeTargets.Method)]
class NoEnumerationAttribute (line 1141) | [AttributeUsage(AttributeTargets.Parameter)]
class RegexPatternAttribute (line 1150) | [AttributeUsage(AttributeTargets.Parameter)]
class XamlItemsControlAttribute (line 1160) | [AttributeUsage(AttributeTargets.Class)]
class XamlItemBindingOfItemsControlAttribute (line 1175) | [AttributeUsage(AttributeTargets.Property)]
class AspChildControlTypeAttribute (line 1181) | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
method AspChildControlTypeAttribute (line 1185) | public AspChildControlTypeAttribute([NotNull] string tagName, [NotNull...
class AspDataFieldAttribute (line 1198) | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
class AspDataFieldsAttribute (line 1204) | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
class AspMethodPropertyAttribute (line 1210) | [AttributeUsage(AttributeTargets.Property)]
class AspRequiredAttributeAttribute (line 1216) | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
method AspRequiredAttributeAttribute (line 1220) | public AspRequiredAttributeAttribute([NotNull] string attribute)
class AspTypePropertyAttribute (line 1229) | [AttributeUsage(AttributeTargets.Property)]
method AspTypePropertyAttribute (line 1233) | public AspTypePropertyAttribute(bool createConstructorReferences)
class RazorImportNamespaceAttribute (line 1241) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method RazorImportNamespaceAttribute (line 1245) | public RazorImportNamespaceAttribute([NotNull] string name)
class RazorInjectionAttribute (line 1254) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method RazorInjectionAttribute (line 1258) | public RazorInjectionAttribute([NotNull] string type, [NotNull] string...
class RazorDirectiveAttribute (line 1271) | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
method RazorDirectiveAttribute (line 1275) | public RazorDirectiveAttribute([NotNull] string directive)
class RazorHelperCommonAttribute (line 1284) | [AttributeUsage(AttributeTargets.Method)]
class RazorLayoutAttribute (line 1290) | [AttributeUsage(AttributeTargets.Property)]
class RazorWriteLiteralMethodAttribute (line 1296) | [AttributeUsage(AttributeTargets.Method)]
class RazorWriteMethodAttribute (line 1302) | [AttributeUsage(AttributeTargets.Method)]
class RazorWriteMethodParameterAttribute (line 1308) | [AttributeUsage(AttributeTargets.Parameter)]
class NoReorder (line 1320) | [AttributeUsage(AttributeTargets.All)]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ApplicationBuilderExtensions.cs
class ApplicationBuilderExtensions (line 16) | public static class ApplicationBuilderExtensions
method UseAllCookies (line 24) | [PublicAPI]
method UseAllCookies (line 34) | [PublicAPI]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSecurityStampValidator.cs
class ExternalSecurityStampValidator (line 13) | [UsedImplicitly]
method ValidateAsync (line 26) | public Task ValidateAsync(CookieValidatePrincipalContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.Net1.cs
class ExternalSignInManager (line 17) | public partial class ExternalSignInManager
method ExternalSignInManager (line 24) | public ExternalSignInManager(IHttpContextAccessor httpContextAccessor,...
method SignInFromExternalCookieAsync (line 45) | [PublicAPI]
method GetExternalPrincipalAsync (line 64) | [PublicAPI]
method SignOutAsync (line 74) | [PublicAPI]
method IsSignedIn (line 90) | [PublicAPI]
method GetExternalAuthenticationSchemes (line 103) | [PublicAPI]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.Net2.cs
class ExternalSignInManager (line 15) | public partial class ExternalSignInManager
method ExternalSignInManager (line 23) | public ExternalSignInManager(IHttpContextAccessor httpContextAccessor,
method SignInFromExternalCookieAsync (line 53) | [PublicAPI]
method GetExternalPrincipalAsync (line 72) | [PublicAPI]
method SignOutAsync (line 83) | [PublicAPI]
method IsSignedIn (line 99) | [PublicAPI]
method GetExternalAuthenticationSchemesAsync (line 112) | [PublicAPI]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.cs
class ExternalSignInManager (line 13) | public partial class ExternalSignInManager
method GetUserName (line 24) | [PublicAPI]
method GetUserName (line 42) | [PublicAPI]
method GetUserId (line 60) | [PublicAPI]
method GetUserId (line 79) | [PublicAPI]
method GetUserRoles (line 97) | [NotNull]
method GetUserRoles (line 116) | [NotNull]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/IdentityHelper.cs
class IdentityHelper (line 11) | [PublicAPI]
method CloneAs (line 25) | public static ClaimsIdentity CloneAs(this ClaimsIdentity identity, str...
method CloneAs (line 47) | public static ClaimsPrincipal CloneAs(this ClaimsPrincipal principal, ...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ServiceCollectionExtensions.cs
class ServiceCollectionExtensions (line 19) | public static class ServiceCollectionExtensions
method AddExternalSignInManager (line 26) | [PublicAPI]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicHtmlLocalizer.cs
type IDynamicHtmlLocalizer (line 8) | public interface IDynamicHtmlLocalizer
type IDynamicHtmlLocalizer (line 31) | public interface IDynamicHtmlLocalizer<TResource> : IDynamicHtmlLocalizer
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicStringLocalizer.cs
type IDynamicStringLocalizer (line 9) | public interface IDynamicStringLocalizer<TResource> : IDynamicStringLoca...
type IDynamicStringLocalizer (line 20) | public interface IDynamicStringLocalizer
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicViewLocalizer.cs
type IDynamicViewLocalizer (line 8) | public interface IDynamicViewLocalizer : IDynamicHtmlLocalizer
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlLocalizer.cs
class DynamicHtmlLocalizer (line 10) | public abstract class DynamicHtmlLocalizer : IDynamicHtmlLocalizer
method DynamicHtmlLocalizer (line 17) | protected DynamicHtmlLocalizer([NotNull] IHtmlLocalizer localizer)
method DynamicHtmlLocalizer (line 45) | [UsedImplicitly]
class DynamicHtmlLocalizer (line 38) | public class DynamicHtmlLocalizer<TResource> : DynamicHtmlLocalizer, IDy...
method DynamicHtmlLocalizer (line 17) | protected DynamicHtmlLocalizer([NotNull] IHtmlLocalizer localizer)
method DynamicHtmlLocalizer (line 45) | [UsedImplicitly]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlLocalizerWrapper.cs
class DynamicHtmlLocalizerWrapper (line 13) | public class DynamicHtmlLocalizerWrapper : DynamicObject, IDynamicLocali...
method DynamicHtmlLocalizerWrapper (line 19) | public DynamicHtmlLocalizerWrapper([NotNull] IHtmlLocalizer innerLocal...
method TryGetMember (line 30) | public override bool TryGetMember(GetMemberBinder binder, out object r...
method TryInvokeMember (line 37) | public override bool TryInvokeMember(InvokeMemberBinder binder, object...
method TryGetIndex (line 44) | public override bool TryGetIndex(GetIndexBinder binder, object[] index...
method GetDynamicMemberNames (line 58) | public override IEnumerable<string> GetDynamicMemberNames()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlTextLocalizerWrapper.cs
class DynamicHtmlTextLocalizerWrapper (line 13) | public class DynamicHtmlTextLocalizerWrapper : DynamicObject, IDynamicLo...
method DynamicHtmlTextLocalizerWrapper (line 19) | public DynamicHtmlTextLocalizerWrapper([NotNull] IHtmlLocalizer innerL...
method TryGetMember (line 30) | public override bool TryGetMember(GetMemberBinder binder, out object r...
method TryInvokeMember (line 37) | public override bool TryInvokeMember(InvokeMemberBinder binder, object...
method TryGetIndex (line 44) | public override bool TryGetIndex(GetIndexBinder binder, object[] index...
method GetDynamicMemberNames (line 58) | public override IEnumerable<string> GetDynamicMemberNames()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicStringLocalizer.cs
class DynamicStringLocalizer (line 10) | public class DynamicStringLocalizer : IDynamicStringLocalizer
method DynamicStringLocalizer (line 17) | public DynamicStringLocalizer([NotNull] IStringLocalizer localizer)
method DynamicStringLocalizer (line 40) | [UsedImplicitly]
class DynamicStringLocalizer (line 33) | public class DynamicStringLocalizer<TResource> : DynamicStringLocalizer,...
method DynamicStringLocalizer (line 17) | public DynamicStringLocalizer([NotNull] IStringLocalizer localizer)
method DynamicStringLocalizer (line 40) | [UsedImplicitly]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicStringLocalizerWrapper.cs
class DynamicStringLocalizerWrapper (line 12) | public class DynamicStringLocalizerWrapper : DynamicObject
method DynamicStringLocalizerWrapper (line 18) | public DynamicStringLocalizerWrapper(IStringLocalizer innerLocalizer)
method TryGetMember (line 29) | public override bool TryGetMember(GetMemberBinder binder, out object r...
method TryInvokeMember (line 36) | public override bool TryInvokeMember(InvokeMemberBinder binder, object...
method TryGetIndex (line 43) | public override bool TryGetIndex(GetIndexBinder binder, object[] index...
method GetDynamicMemberNames (line 57) | public override IEnumerable<string> GetDynamicMemberNames()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicViewLocalizer.cs
class DynamicViewLocalizer (line 11) | public class DynamicViewLocalizer : DynamicHtmlLocalizer, IDynamicViewLo...
method DynamicViewLocalizer (line 17) | [UsedImplicitly]
method Contextualize (line 28) | void IViewContextAware.Contextualize(ViewContext viewContext)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/IDynamicLocalizerWrapper.cs
type IDynamicLocalizerWrapper (line 9) | public interface IDynamicLocalizerWrapper : IDynamicMetaObjectProvider
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/ServiceCollectionExtensions.cs
class ServiceCollectionExtensions (line 12) | public static class ServiceCollectionExtensions
method AddDynamicLocalizer (line 18) | public static void AddDynamicLocalizer([NotNull] this IServiceCollecti...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Localization.Dictionary/DictionaryStringLocalizer.cs
class DictionaryStringLocalizer (line 12) | public class DictionaryStringLocalizer : IStringLocalizer
method GetAllStrings (line 17) | public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCu...
method WithCulture (line 23) | public IStringLocalizer WithCulture(CultureInfo culture)
method TryFetchStringCore (line 45) | private static bool TryFetchStringCore(IReadOnlyDictionary<string, str...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/IOperationMessageAccessor.cs
type IOperationMessageAccessor (line 8) | public interface IOperationMessageAccessor
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessage.cs
class OperationMessage (line 9) | [PublicAPI]
method OperationMessage (line 15) | public OperationMessage()
method OperationMessage (line 25) | public OperationMessage(
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessageExtensions.cs
class OperationMessageExtensions (line 13) | [PublicAPI]
method Add (line 25) | public static OperationMessage Add([NotNull] this IOperationMessageAcc...
method Add (line 47) | public static OperationMessage Add([NotNull] this IOperationMessageAcc...
method EncodeToHtml (line 60) | private static IHtmlContent EncodeToHtml(string value)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessageLevel.cs
type OperationMessageLevel (line 7) | public enum OperationMessageLevel
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/DefaultOperationMessageAccessor.cs
class DefaultOperationMessageAccessor (line 13) | public class DefaultOperationMessageAccessor : IOperationMessageAccessor
method DefaultOperationMessageAccessor (line 21) | public DefaultOperationMessageAccessor(IHttpContextAccessor httpContex...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/OperationMessageOptions.cs
class OperationMessageOptions (line 10) | public class OperationMessageOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/OperationMessageServiceCollectionExtensions.cs
class OperationMessageServiceCollectionExtensions (line 14) | [PublicAPI]
method AddOperationMessageAccessor (line 24) | public static IServiceCollection AddOperationMessageAccessor(this ISer...
method ConfigureOperationMessages (line 53) | public static IServiceCollection ConfigureOperationMessages(this IServ...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/ActionResultException.cs
class ActionResultException (line 15) | public class ActionResultException : Exception
method ActionResultException (line 21) | public ActionResultException(IActionResult result)
method ActionResultException (line 31) | public ActionResultException(string message, IActionResult result) : b...
method ActionResultException (line 42) | public ActionResultException(string message, Exception inner, IActionR...
method ActionResultException (line 58) | public ActionResultException(int statusCode)
method ActionResultException (line 67) | public ActionResultException(HttpStatusCode statusCode)
method ActionResultException (line 77) | public ActionResultException(int statusCode, object value)
method ActionResultException (line 87) | public ActionResultException(HttpStatusCode statusCode, object value)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/EnableActionResultExceptionAttribute.cs
class EnableActionResultExceptionAttribute (line 8) | public class EnableActionResultExceptionAttribute : ExceptionFilterAttri...
method OnException (line 11) | public override void OnException(ExceptionContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/ServiceExtensions.cs
class ServiceExtensions (line 11) | public static class ServiceExtensions
method EnableActionResultExceptionFilter (line 19) | public static void EnableActionResultExceptionFilter(this FilterCollec...
method EnableActionResultExceptionFilter (line 33) | public static void EnableActionResultExceptionFilter(this MvcOptions m...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/CssClassBasedIconMapper.cs
class CssClassBasedIconMapper (line 10) | public class CssClassBasedIconMapper(IIconToCssClassMapper cssClassMapper)
method GenerateBaseTag (line 30) | protected virtual TagBuilder GenerateBaseTag()
method GetIconHtml (line 39) | public IHtmlContent? GetIconHtml(OperationMessageLevel level)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IIconMapper.cs
type IIconMapper (line 8) | public interface IIconMapper
method GetIconHtml (line 15) | IHtmlContent? GetIconHtml(OperationMessageLevel level);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IIconToCssClassMapper.cs
type IIconToCssClassMapper (line 8) | public interface IIconToCssClassMapper
method GetIconCssClass (line 15) | string? GetIconCssClass(OperationMessageLevel level);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IOperationMessageHtmlGenerator.cs
type IOperationMessageHtmlGenerator (line 11) | public interface IOperationMessageHtmlGenerator
method GenerateList (line 19) | IHtmlContent GenerateList(IEnumerable<OperationMessage> messages, TagH...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IOperationMessageLevelToStyleMapper.cs
type IOperationMessageLevelToStyleMapper (line 6) | public interface IOperationMessageLevelToStyleMapper
method GetLevelStyleName (line 13) | string? GetLevelStyleName(OperationMessageLevel level);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5AlertMessageContentLayout.cs
type Bootstrap5AlertMessageContentLayout (line 6) | public enum Bootstrap5AlertMessageContentLayout
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5AlertMessageHtmlGenerator.cs
class Bootstrap5AlertMessageHtmlGenerator (line 17) | public class Bootstrap5AlertMessageHtmlGenerator(IOperationMessageLevelT...
method GenerateList (line 21) | public IHtmlContent GenerateList(IEnumerable<OperationMessage> message...
method GenerateAlertItem (line 43) | private IHtmlContent? GenerateAlertItem(OperationMessage message)
method GenerateSeparator (line 124) | private static IHtmlContent GenerateSeparator(Bootstrap5AlertMessageCo...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5AlertMessageHtmlGeneratorOptions.cs
type Bootstrap5AlertMessageHtmlGeneratorOptions (line 6) | public record Bootstrap5AlertMessageHtmlGeneratorOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5MessagesServiceBuilder.cs
class Bootstrap5MessagesServiceBuilder (line 9) | public sealed class Bootstrap5MessagesServiceBuilder(IServiceCollection ...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5ToastMessageHtmlGenerator.cs
class Bootstrap5ToastMessageHtmlGenerator (line 13) | public class Bootstrap5ToastMessageHtmlGenerator(IOperationMessageLevelT...
method GenerateList (line 17) | public IHtmlContent GenerateList(IEnumerable<OperationMessage> message...
method GenerateItem (line 39) | private IHtmlContent GenerateItem(OperationMessage message)
method GetAlignmentClasses (line 129) | private IEnumerable<string> GetAlignmentClasses()
method GeneratePositionClassForHorizontalAlignment (line 135) | private static string GeneratePositionClassForHorizontalAlignment(Hori...
method GeneratePositionClassForVerticalAlignment (line 146) | private static string GeneratePositionClassForVerticalAlignment(Vertic...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5ToastMessageHtmlGeneratorOptions.cs
type Bootstrap5ToastMessageHtmlGeneratorOptions (line 5) | public record Bootstrap5ToastMessageHtmlGeneratorOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapBuilderExtensions.cs
class BootstrapBuilderExtensions (line 15) | public static class BootstrapBuilderExtensions
method UseBootstrap5Alerts (line 23) | public static Bootstrap5MessagesServiceBuilder UseBootstrap5Alerts(thi...
method UseBootstrap5Toasts (line 42) | public static Bootstrap5MessagesServiceBuilder UseBootstrap5Toasts(thi...
method UseBootstrapIcons (line 60) | public static void UseBootstrapIcons(this IBootstrapIconServiceBuilder...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapIconCssClassMapperOptions.cs
type BootstrapIconCssClassMapperOptions (line 6) | public record BootstrapIconCssClassMapperOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapIconMapper.cs
class BootstrapIconMapper (line 7) | public class BootstrapIconMapper(IIconToCssClassMapper cssClassMapper)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapIconStyle.cs
type BootstrapIconStyle (line 6) | public enum BootstrapIconStyle
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/DefaultBootstrap5OperationMessageLevelToStyleMapper.cs
class DefaultBootstrap5OperationMessageLevelToStyleMapper (line 6) | public class DefaultBootstrap5OperationMessageLevelToStyleMapper : IOper...
method GetLevelStyleName (line 9) | public string? GetLevelStyleName(OperationMessageLevel level)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/DefaultBootstrapIconCssClassMapper.cs
class DefaultBootstrapIconCssClassMapper (line 9) | public class DefaultBootstrapIconCssClassMapper(IOptions<BootstrapIconCs...
method GetIconCssClass (line 13) | public string? GetIconCssClass(OperationMessageLevel level)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/HorizontalAlignment.cs
type HorizontalAlignment (line 3) | public enum HorizontalAlignment
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/IBootstrapIconServiceBuilder.cs
type IBootstrapIconServiceBuilder (line 8) | public interface IBootstrapIconServiceBuilder
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Utility.cs
class Utility (line 12) | internal static class Utility
method ForEach (line 20) | public static void ForEach<T>(this IEnumerable<T> source, Action<T> ac...
method AddCssClasses (line 33) | public static void AddCssClasses(this TagBuilder tag, params IEnumerab...
method ToJavaScriptString (line 43) | public static string ToJavaScriptString(this bool value) =>
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/VerticalAlignment.cs
type VerticalAlignment (line 3) | public enum VerticalAlignment
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/MessageTagHelper.cs
class MessageTagHelper (line 12) | [HtmlTargetElement(TagName)]
method Process (line 28) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/OperationMessageServiceBuilder.cs
class OperationMessageServiceBuilder (line 9) | public sealed class OperationMessageServiceBuilder(IServiceCollection se...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/ServiceCollectionExtensions.cs
class ServiceCollectionExtensions (line 16) | [PublicAPI]
method AddOperationMessages (line 24) | public static OperationMessageServiceBuilder AddOperationMessages(this...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/StaticIIconToCssClassMapper.cs
class StaticIIconToCssClassMapper (line 10) | public class StaticIIconToCssClassMapper(IReadOnlyDictionary<OperationMe...
method GetIconCssClass (line 19) | public string? GetIconCssClass(OperationMessageLevel level)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/FirstAndLastPagerItemActiveMode.cs
type FirstAndLastPagerItemActiveMode (line 6) | public enum FirstAndLastPagerItemActiveMode
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/BaseUriLinkGenerator.cs
class BaseUriLinkGenerator (line 12) | public abstract class BaseUriLinkGenerator : IPagerItemLinkGenerator
method GenerateLink (line 24) | [Pure]
method GetRealBaseUri (line 67) | [Pure]
method GetCurrentUriWithQuery (line 78) | [Pure]
method HandleUriCore (line 96) | protected abstract Uri HandleUriCore([NotNull] Uri baseUri, [NotNull] ...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomHtmlContentGenerator.cs
class CustomHtmlContentGenerator (line 10) | public class CustomHtmlContentGenerator : IPagerItemContentGenerator
method CustomHtmlContentGenerator (line 16) | public CustomHtmlContentGenerator([NotNull] Func<PagerItemGenerationCo...
method GenerateContent (line 33) | public IHtmlContent GenerateContent(PagerItemGenerationContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomLinkGenerator.cs
class CustomLinkGenerator (line 10) | public class CustomLinkGenerator : IPagerItemLinkGenerator
method CustomLinkGenerator (line 16) | public CustomLinkGenerator([NotNull] Func<PagerItemGenerationContext, ...
method GenerateLink (line 32) | public string GenerateLink(PagerItemGenerationContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomQueryStringLinkGenerator.cs
class CustomQueryStringLinkGenerator (line 11) | public class CustomQueryStringLinkGenerator : QueryStringLinkGenerator
method CustomQueryStringLinkGenerator (line 22) | public CustomQueryStringLinkGenerator([NotNull] Func<PagerItemGenerati...
method GenerateQueryParameterName (line 46) | public override string GenerateQueryParameterName(PagerItemGenerationC...
method GenerateQueryParameterValue (line 56) | public override string GenerateQueryParameterValue(PagerItemGeneration...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomQueryValueLinkGenerator.cs
class CustomQueryValueLinkGenerator (line 10) | public class CustomQueryValueLinkGenerator : QueryValueLinkGenerator
method CustomQueryValueLinkGenerator (line 21) | public CustomQueryValueLinkGenerator([NotNull] string queryParameterName,
method GenerateQueryParameterValue (line 38) | public override string GenerateQueryParameterValue(PagerItemGeneration...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomStringContentGenerator.cs
class CustomStringContentGenerator (line 10) | public class CustomStringContentGenerator : StringContentGenerator
method CustomStringContentGenerator (line 18) | public CustomStringContentGenerator([NotNull] Func<PagerItemGeneration...
method GenerateContentString (line 36) | protected override string GenerateContentString(PagerItemGenerationCon...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/DisabledLinkGenerator.cs
class DisabledLinkGenerator (line 8) | public class DisabledLinkGenerator : IPagerItemLinkGenerator
method GenerateLink (line 14) | public string GenerateLink(PagerItemGenerationContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FormattedLinkGenerator.cs
class FormattedLinkGenerator (line 11) | public class FormattedLinkGenerator : IPagerItemLinkGenerator
method FormattedLinkGenerator (line 22) | public FormattedLinkGenerator([NotNull] string format,
method GenerateLink (line 49) | public string GenerateLink(PagerItemGenerationContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FormattedQueryValueLinkGenerator.cs
class FormattedQueryValueLinkGenerator (line 12) | public class FormattedQueryValueLinkGenerator : QueryValueLinkGenerator
method FormattedQueryValueLinkGenerator (line 27) | public FormattedQueryValueLinkGenerator([NotNull] string queryParamete...
method GenerateQueryParameterValue (line 54) | public override string GenerateQueryParameterValue(PagerItemGeneration...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FormattedStringContentGenerator.cs
class FormattedStringContentGenerator (line 12) | public class FormattedStringContentGenerator : StringContentGenerator
method FormattedStringContentGenerator (line 24) | public FormattedStringContentGenerator([LocalizationRequired] [NotNull...
method GenerateContentString (line 50) | protected override string GenerateContentString(PagerItemGenerationCon...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FragmentLinkGenerator.cs
class FragmentLinkGenerator (line 9) | public abstract class FragmentLinkGenerator : BaseUriLinkGenerator
method HandleUriCore (line 22) | protected override Uri HandleUriCore(Uri baseUri, PagerItemGenerationC...
method GenerateFragment (line 39) | protected abstract string GenerateFragment([NotNull] PagerItemGenerati...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/QueryStringLinkGenerator.cs
class QueryStringLinkGenerator (line 13) | public abstract class QueryStringLinkGenerator : BaseUriLinkGenerator
method ChangeQueryParameterValue (line 25) | [PublicAPI]
method GenerateQueryParameterName (line 52) | public abstract string GenerateQueryParameterName([NotNull] PagerItemG...
method GenerateQueryParameterValue (line 59) | public abstract string GenerateQueryParameterValue([NotNull] PagerItem...
method HandleUriCore (line 72) | protected override Uri HandleUriCore(Uri baseUri, PagerItemGenerationC...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/QueryValueLinkGenerator.cs
class QueryValueLinkGenerator (line 10) | public abstract class QueryValueLinkGenerator : QueryStringLinkGenerator
method QueryValueLinkGenerator (line 17) | protected QueryValueLinkGenerator([NotNull] string queryParameterName)
method GenerateQueryParameterName (line 34) | public override string GenerateQueryParameterName(PagerItemGenerationC...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/SimpleLinkGenerator.cs
class SimpleLinkGenerator (line 10) | public class SimpleLinkGenerator : IPagerItemLinkGenerator
method SimpleLinkGenerator (line 17) | public SimpleLinkGenerator([NotNull] string text)
method GenerateLink (line 35) | public string GenerateLink(PagerItemGenerationContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/SimpleQueryValueLinkGenerator.cs
class SimpleQueryValueLinkGenerator (line 10) | public class SimpleQueryValueLinkGenerator : QueryValueLinkGenerator
method SimpleQueryValueLinkGenerator (line 21) | public SimpleQueryValueLinkGenerator([NotNull] string queryParameterNa...
method GenerateQueryParameterValue (line 39) | public override string GenerateQueryParameterValue(PagerItemGeneration...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/SimpleStringContentGenerator.cs
class SimpleStringContentGenerator (line 10) | public class SimpleStringContentGenerator : StringContentGenerator
method SimpleStringContentGenerator (line 21) | public SimpleStringContentGenerator([LocalizationRequired] [NotNull] s...
method GenerateContentString (line 38) | protected override string GenerateContentString(PagerItemGenerationCon...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/StringContentGenerator.cs
class StringContentGenerator (line 11) | public abstract class StringContentGenerator : IPagerItemContentGenerator
method StringContentGenerator (line 20) | protected StringContentGenerator(bool encodeText)
method GenerateContent (line 37) | public IHtmlContent GenerateContent(PagerItemGenerationContext context)
method GenerateContentString (line 47) | protected abstract string GenerateContentString(PagerItemGenerationCon...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/IPagerItemContentGenerator.cs
type IPagerItemContentGenerator (line 10) | [TypeConverter(typeof(PagerItemContentGeneratorConverter))]
method GenerateContent (line 18) | IHtmlContent GenerateContent(PagerItemGenerationContext context);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/IPagerItemLinkGenerator.cs
type IPagerItemLinkGenerator (line 10) | [TypeConverter(typeof(PagerItemLinkGeneratorConverter))]
method GenerateLink (line 17) | string? GenerateLink([NotNull] PagerItemGenerationContext context);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/BootstrapPagerHtmlGenerator.cs
class BootstrapPagerHtmlGenerator (line 15) | [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSigna...
method GeneratePager (line 24) | public IHtmlContent GeneratePager(PagerRenderingList list, PagerGenera...
method CanLink (line 39) | private static bool CanLink(PagerRenderingItem item)
method AppendAdditionalAttributes (line 53) | private static void AppendAdditionalAttributes(TagBuilder tag, IDictio...
method GeneratePagerCore (line 67) | protected static IHtmlContent GeneratePagerCore(PagerRenderingList lis...
method GenerateContainer (line 89) | protected static TagBuilder GenerateContainer(PagerRenderingList list)
method GeneratePagerItems (line 104) | protected static IHtmlContent GeneratePagerItems(IEnumerable<PagerRend...
method GeneratePagerItem (line 122) | protected static IHtmlContent GeneratePagerItem(PagerRenderingItem item)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/DefaultPagerGenerator.cs
class DefaultPagerGenerator (line 9) | public class DefaultPagerGenerator : IPagerGenerator
method DefaultPagerGenerator (line 26) | public DefaultPagerGenerator(IPagerListGenerator listGenerator, IPager...
method GeneratePager (line 44) | public IHtmlContent GeneratePager(PagerGenerationContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/DefaultPagerListGenerator.cs
class DefaultPagerListGenerator (line 10) | public class DefaultPagerListGenerator : IPagerListGenerator
method GeneratePagerItems (line 17) | public PagerList GeneratePagerItems(PagerGenerationContext context)
method GeneratePagerNormalItems (line 32) | private static IEnumerable<PagerItem> GeneratePagerNormalItems(int cur...
method GenerateSpecialItems (line 98) | private PagerItem GenerateSpecialItems(int currentPage, int totalPage,...
method GenerateItemsForLayoutElement (line 143) | private IEnumerable<PagerItem> GenerateItemsForLayoutElement(PagerLayo...
method GenerateItemsCore (line 169) | private IEnumerable<PagerItem> GenerateItemsCore(int currentPage, int ...
method GeneratePagerItemsCore (line 199) | public IEnumerable<PagerItem> GeneratePagerItemsCore(int currentPage, ...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/DefaultPagerRenderingListGenerator.cs
class DefaultPagerRenderingListGenerator (line 10) | public class DefaultPagerRenderingListGenerator : IPagerRenderingListGen...
method GenerateRenderingList (line 18) | public PagerRenderingList GenerateRenderingList(PagerList list, PagerG...
method IsPageVisible (line 31) | private static bool IsPageVisible(PagerItemGenerationContext context)
method ItemShouldBeDisabled (line 46) | private bool ItemShouldBeDisabled(PagerItemGenerationContext context)
method GetRenderingItemState (line 78) | private PagerRenderingItemState GetRenderingItemState(PagerItemGenerat...
method GenerateRenderingItem (line 112) | private PagerRenderingItem GenerateRenderingItem(PagerRenderingList li...
method GenerateRenderingListCore (line 129) | private PagerRenderingList GenerateRenderingListCore(IEnumerable<Pager...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerGenerator.cs
type IPagerGenerator (line 8) | public interface IPagerGenerator
method GeneratePager (line 15) | IHtmlContent GeneratePager(PagerGenerationContext context);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerHtmlGenerator.cs
type IPagerHtmlGenerator (line 8) | public interface IPagerHtmlGenerator
method GeneratePager (line 16) | IHtmlContent GeneratePager(PagerRenderingList list, PagerGenerationCon...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerListGenerator.cs
type IPagerListGenerator (line 7) | public interface IPagerListGenerator
method GeneratePagerItems (line 14) | PagerList GeneratePagerItems(PagerGenerationContext context);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerRenderingListGenerator.cs
type IPagerRenderingListGenerator (line 7) | public interface IPagerRenderingListGenerator
method GenerateRenderingList (line 15) | PagerRenderingList GenerateRenderingList(PagerList list, PagerGenerati...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerGenerationContext.cs
class PagerGenerationContext (line 8) | public class PagerGenerationContext
method PagerGenerationContext (line 13) | protected PagerGenerationContext()
method PagerGenerationContext (line 25) | public PagerGenerationContext(
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItem.cs
class PagerItem (line 9) | [PublicAPI]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItemContentGeneratorConverter.cs
class PagerItemContentGeneratorConverter (line 10) | public class PagerItemContentGeneratorConverter : TypeConverter
method CanConvertFrom (line 20) | public override bool CanConvertFrom(ITypeDescriptorContext context, Ty...
method ConvertFrom (line 35) | public override object ConvertFrom(ITypeDescriptorContext context, Cul...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItemLinkGeneratorConverter.cs
class PagerItemLinkGeneratorConverter (line 10) | public class PagerItemLinkGeneratorConverter : TypeConverter
method CanConvertFrom (line 16) | public override bool CanConvertFrom(ITypeDescriptorContext context, Ty...
method ConvertFrom (line 27) | public override object ConvertFrom(ITypeDescriptorContext context, Cul...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItemType.cs
type PagerItemType (line 6) | public enum PagerItemType
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerLayoutConverter.cs
class PagerLayoutConverter (line 12) | public class PagerLayoutConverter : TypeConverter
method CanConvertFrom (line 15) | public override bool CanConvertFrom(ITypeDescriptorContext context, Ty...
method ConvertFrom (line 21) | public override object ConvertFrom(ITypeDescriptorContext context, Cul...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerList.cs
class PagerList (line 10) | public class PagerList
method PagerList (line 16) | public PagerList([NotNull] [ItemNotNull] IEnumerable<PagerItem> items)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerRenderingItem.cs
class PagerRenderingItem (line 11) | public class PagerRenderingItem
method PagerRenderingItem (line 17) | public PagerRenderingItem([NotNull] PagerRenderingList list)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerRenderingItemState.cs
type PagerRenderingItemState (line 6) | public enum PagerRenderingItemState
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerRenderingList.cs
class PagerRenderingList (line 8) | public class PagerRenderingList
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/StringToHtmlContentConverter.cs
class StringToHtmlContentConverter (line 9) | public static class StringToHtmlContentConverter
method ToHtmlContent (line 20) | public static IHtmlContent ToHtmlContent(this string value, bool encod...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/Utility.cs
class Utility (line 10) | internal static class Utility
method GetValueOfDefault (line 28) | public static TValue GetValueOfDefault<TKey, TValue>([NotNull] this ID...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerGenerationMode.cs
type PagerGenerationMode (line 6) | public enum PagerGenerationMode
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemContentGenerators.cs
class PagerItemContentGenerators (line 14) | [PublicAPI]
method FromConfiguration (line 33) | public static IPagerItemContentGenerator FromConfiguration(string conf...
method Text (line 83) | public static IPagerItemContentGenerator Text(string text)
method Html (line 93) | public static IPagerItemContentGenerator Html(string html)
method Content (line 104) | public static IPagerItemContentGenerator Content(IHtmlContent content)
method TextFormat (line 118) | public static IPagerItemContentGenerator TextFormat(string textFormat,...
method HtmlFormat (line 132) | public static IPagerItemContentGenerator HtmlFormat(string htmlFormat,...
method CustomText (line 146) | public static IPagerItemContentGenerator CustomText(Func<PagerItemGene...
method CustomText (line 156) | public static IPagerItemContentGenerator CustomText(Func<PagerItem, st...
method CustomText (line 166) | public static IPagerItemContentGenerator CustomText(Func<int, string> ...
method CustomText (line 176) | public static IPagerItemContentGenerator CustomText(Func<string> textG...
method CustomHtml (line 190) | public static IPagerItemContentGenerator CustomHtml(Func<PagerItemGene...
method CustomHtml (line 200) | public static IPagerItemContentGenerator CustomHtml(Func<PagerItem, st...
method CustomHtml (line 210) | public static IPagerItemContentGenerator CustomHtml(Func<int, string> ...
method CustomHtml (line 220) | public static IPagerItemContentGenerator CustomHtml(Func<string> htmlG...
method CustomContent (line 234) | public static IPagerItemContentGenerator CustomContent(
method CustomContent (line 245) | public static IPagerItemContentGenerator CustomContent(Func<PagerItem,...
method CustomContent (line 255) | public static IPagerItemContentGenerator CustomContent(Func<int, IHtml...
method CustomContent (line 265) | public static IPagerItemContentGenerator CustomContent(Func<IHtmlConte...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemGenerationContext.cs
class PagerItemGenerationContext (line 10) | public class PagerItemGenerationContext : PagerGenerationContext
method PagerItemGenerationContext (line 18) | public PagerItemGenerationContext([NotNull] PagerGenerationContext bas...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemLinkGenerators.cs
class PagerItemLinkGenerators (line 13) | [PublicAPI]
method FromConfiguration (line 23) | public static IPagerItemLinkGenerator FromConfiguration(string configu...
method QueryNameAndValueFormat (line 85) | public static FormattedQueryValueLinkGenerator QueryNameAndValueFormat...
method QueryName (line 97) | public static FormattedQueryValueLinkGenerator QueryName([NotNull] str...
method Format (line 122) | public static FormattedLinkGenerator Format([NotNull] string format, I...
method Fixed (line 132) | public static SimpleLinkGenerator Fixed([NotNull] string text)
method Custom (line 142) | public static CustomLinkGenerator Custom([NotNull] Func<PagerItemGener...
method Custom (line 152) | public static CustomLinkGenerator Custom([NotNull] Func<PagerItem, str...
method Custom (line 162) | public static CustomLinkGenerator Custom([NotNull] Func<int, string> l...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemMode.cs
type PagerItemMode (line 6) | public enum PagerItemMode
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemOptions.cs
class PagerItemOptions (line 10) | public class PagerItemOptions
method Clone (line 42) | public PagerItemOptions Clone()
method Merge (line 62) | [Pure]
method MergeAll (line 95) | [NotNull]
method MergeAll (line 109) | [NotNull]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemOptionsSet.cs
class PagerItemOptionsSet (line 11) | public class PagerItemOptionsSet
method PagerItemOptionsSet (line 16) | public PagerItemOptionsSet()
method GetOptionsFor (line 80) | public PagerItemOptions GetOptionsFor(PagerLayoutElement layoutElement)
method GetOptionsFor (line 105) | public PagerItemOptions GetOptionsFor(PagerItemType itemType)
method GetOptionsFor (line 134) | public PagerItemOptions GetOptionsFor([NotNull] PagerItem item)
method GetBaseItemType (line 148) | public static PagerItemType? GetBaseItemType(PagerItemType itemType)
method GetMergedOptionsFor (line 165) | [NotNull]
method GetMergedOptionsFor (line 191) | [NotNull]
method Clone (line 204) | public PagerItemOptionsSet Clone()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerLayout.cs
class PagerLayout (line 14) | [TypeConverter(typeof(PagerLayoutConverter))]
method PagerLayout (line 21) | public PagerLayout([NotNull] IEnumerable<PagerLayoutElement> elements)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerLayoutElement.cs
type PagerLayoutElement (line 6) | public enum PagerLayoutElement
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerLayouts.cs
class PagerLayouts (line 11) | [PublicAPI]
method GenerateLayout (line 19) | private static PagerLayout GenerateLayout(IEnumerable<PagerLayoutEleme...
method Custom (line 62) | public static PagerLayout Custom(params PagerLayoutElement[] items)
method Custom (line 72) | public static PagerLayout Custom(IEnumerable<PagerLayoutElement> items)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerOptions.cs
class PagerOptions (line 9) | public class PagerOptions
method Clone (line 66) | public virtual PagerOptions Clone()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerOptionsExtensions.cs
class PagerOptionsExtensions (line 9) | public static class PagerOptionsExtensions
method ConfigureDefault (line 16) | [PublicAPI]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/ServiceCollectionExtensions.cs
class ServiceCollectionExtensions (line 11) | public static class ServiceCollectionExtensions
method AddBootstrapPagerGenerator (line 17) | public static void AddBootstrapPagerGenerator(this IServiceCollection ...
method AddBootstrapPagerGenerator (line 34) | public static void AddBootstrapPagerGenerator(this IServiceCollection ...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/SpecialPagerItemInactiveBehavior.cs
type SpecialPagerItemInactiveBehavior (line 6) | public enum SpecialPagerItemInactiveBehavior
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/AjaxOptions.cs
class AjaxOptions (line 6) | public class AjaxOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/AjaxUpdateMode.cs
type AjaxUpdateMode (line 6) | public enum AjaxUpdateMode
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/PagerTagHelper.cs
class PagerTagHelper (line 16) | [HtmlTargetElement(HtmlTagName, TagStructure = TagStructure.WithoutEndTag)]
method PagerTagHelper (line 26) | public PagerTagHelper(IOptions<PagerOptions> defaultOptions)
method GetPagingInfoFromSource (line 55) | private static void GetPagingInfoFromSource([NotNull]IPagedList source...
method GetPagingInfo (line 67) | private void GetPagingInfo(TagHelperContext context, out int currentPa...
method GetRealGenerator (line 138) | private IPagerGenerator GetRealGenerator(TagHelperContext context)
method MergeShortcutProperties (line 168) | private PagerOptions MergeShortcutProperties(PagerOptions original, Ta...
method GetRealOptions (line 192) | private PagerOptions GetRealOptions(TagHelperContext context)
method CheckOptions (line 225) | private void CheckOptions([NotNull] PagerOptions options)
method Process (line 253) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/TagHelperUtility.cs
class TagHelperUtility (line 9) | internal static class TagHelperUtility
method CheckAttributeConflicting (line 16) | public static void CheckAttributeConflicting(this TagHelperContext con...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/AuthorizeAttributeTagHelper.cs
class AuthorizeAttributeTagHelper (line 11) | [HtmlTargetElement("*", Attributes = PolicyAttributeName)]
method AuthorizeAttributeTagHelper (line 18) | [UsedImplicitly]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/AuthorizeTagHelper.cs
class AuthorizeTagHelper (line 12) | [HtmlTargetElement(ElementName)]
method AuthorizeTagHelper (line 19) | [UsedImplicitly]
method ProcessAsync (line 45) | public override Task ProcessAsync(TagHelperContext context, TagHelperO...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/AuthorizeTagHelperBase.cs
class AuthorizeTagHelperBase (line 16) | public abstract class AuthorizeTagHelperBase : TagHelper
method AuthorizeTagHelperBase (line 22) | protected AuthorizeTagHelperBase(IAuthorizationService authorizationSe...
method IsAuthorizedAsync (line 53) | protected async Task<bool> IsAuthorizedAsync()
method IsAuthorizedAsync (line 63) | protected Task<bool> IsAuthorizedAsync()
method ProcessAsync (line 73) | public override async Task ProcessAsync(TagHelperContext context, TagH...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ConditionalClassTagHelper.cs
class ConditionalClassTagHelper (line 13) | [HtmlTargetElement(Attributes = ConditionalClassPrefix + "*")]
method Process (line 44) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/DisplayTextTagHelper.cs
class DisplayTextTagHelper (line 16) | [HtmlTargetElement(Attributes = TargetElementName)]
method DisplayTextTagHelper (line 19) | public DisplayTextTagHelper(IServiceProvider serviceProvider)
method Process (line 47) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumForSelectTagHelper.cs
class EnumForSelectTagHelper (line 14) | [HtmlTargetElement("select", Attributes = EnumForAttributeName)]
method EnumForSelectTagHelper (line 22) | public EnumForSelectTagHelper(IHtmlGenerator generator, IServiceProvid...
method GetEnumType (line 44) | protected override Type GetEnumType()
method Process (line 63) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumOptionValueSource.cs
type EnumOptionValueSource (line 7) | public enum EnumOptionValueSource
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumSelectTagHelper.cs
class EnumSelectTagHelper (line 17) | public abstract class EnumSelectTagHelper : TagHelper
method EnumSelectTagHelper (line 25) | protected EnumSelectTagHelper(IServiceProvider serviceProvider)
method GetEnumType (line 53) | protected abstract Type GetEnumType();
method GenerateListForEnumType (line 61) | protected virtual IEnumerable<SelectListItem> GenerateListForEnumType()
method GetTextForMember (line 103) | protected virtual string GetTextForMember(MemberInfo memberInfo)
method GetValueForMember (line 114) | protected virtual string GetValueForMember(MemberInfo memberInfo)
method GetItemForMember (line 124) | protected virtual SelectListItem GetItemForMember(MemberInfo memberInfo)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumTypeSelectTagHelper.cs
class EnumTypeSelectTagHelper (line 13) | [HtmlTargetElement("select", Attributes = EnumTypeAttributeName)]
method EnumTypeSelectTagHelper (line 23) | public EnumTypeSelectTagHelper(IServiceProvider serviceProvider)
method GetEnumType (line 34) | protected override Type GetEnumType()
method Process (line 57) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumValueTextHelper.cs
class EnumValueTextHelper (line 14) | [HtmlTargetElement(TargetElementName)]
method EnumValueTextHelper (line 19) | public EnumValueTextHelper(IServiceProvider serviceProvider)
method Process (line 53) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumInputTagHelper.cs
class FlagsEnumInputTagHelper (line 12) | [HtmlTargetElement("input", Attributes = EnumFlagForAttributeName + "," ...
method FlagsEnumInputTagHelper (line 28) | [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSig...
method Process (line 66) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumModelBinder.cs
class FlagsEnumModelBinder (line 12) | public class FlagsEnumModelBinder : IModelBinder
method BindModelAsync (line 39) | public Task BindModelAsync(ModelBindingContext bindingContext)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumModelBinderProvider.cs
class FlagsEnumModelBinderProvider (line 11) | public class FlagsEnumModelBinderProvider : IModelBinderProvider
method GetBinder (line 19) | public IModelBinder GetBinder([NotNull] ModelBinderProviderContext con...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumModelBinderServiceCollectionExtensions.cs
class FlagsEnumModelBinderServiceCollectionExtensions (line 18) | [PublicAPI]
method FirstIndexOfOrDefault (line 32) | private static int FirstIndexOfOrDefault<T>(this IEnumerable<T> source...
method FindModelBinderProviderInsertLocation (line 52) | private static int FindModelBinderProviderInsertLocation(this IList<IM...
method InsertFlagsEnumModelBinderProvider (line 71) | public static void InsertFlagsEnumModelBinderProvider(this IList<IMode...
method AddFlagsEnumModelBinderProvider (line 93) | public static MvcOptions AddFlagsEnumModelBinderProvider(this MvcOptio...
method AddFlagsEnumModelBinderProvider (line 107) | public static IMvcBuilder AddFlagsEnumModelBinderProvider(this IMvcBui...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/HtmlGeneratorHelper.cs
class HtmlGeneratorHelper (line 16) | internal static class HtmlGeneratorHelper
method GenerateOption (line 27) | private static TagBuilder GenerateOption(SelectListItem item, string t...
method GenerateGroupsAndOptions (line 50) | public static IHtmlContent GenerateGroupsAndOptions(string optionLabel...
method GenerateOption (line 104) | private static IHtmlContent GenerateOption(SelectListItem item)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/IdFormatTagHelper.cs
class IdFormatTagHelper (line 13) | [HtmlTargetElement("*", Attributes = IdFormatAttributeName)]
method GetNextCount (line 67) | protected int GetNextCount()
method Process (line 82) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/OptionLabelPosition.cs
type OptionLabelPosition (line 6) | public enum OptionLabelPosition
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/PartialViewItemTagHelper.cs
class PartialViewItemTagHelper (line 12) | [HtmlTargetElement("partial", Attributes = $"{ViewDataItemAttributePrefi...
method Process (line 50) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ReflectionHelper.cs
class ReflectionHelper (line 13) | [PublicAPI]
method GetMember (line 21) | public static FieldInfo GetMember(this Enum obj)
method GetTextForMember (line 38) | public static string GetTextForMember(this MemberInfo memberInfo, Text...
method GetValueForEnumMember (line 84) | public static string GetValueForEnumMember(this MemberInfo memberInfo,...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ResourceHelper.cs
class ResourceHelper (line 8) | public static class ResourceHelper
method TryGetLocalizedText (line 19) | public static string TryGetLocalizedText(this IStringLocalizer localiz...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/SelectOptionLabelTagHelper.cs
class SelectOptionLabelTagHelper (line 10) | [HtmlTargetElement("select", Attributes = OptionLabelAttributeName)]
method Process (line 20) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/SelectValueOptionTagHelper.cs
class SelectValueOptionTagHelper (line 11) | [HtmlTargetElement("option")]
method SetSelectedValue (line 39) | [PublicAPI]
method GetSelectedValueFromContext (line 53) | protected string GetSelectedValueFromContext(TagHelperContext context)
method GetSelectedValueCompareModeFromContext (line 67) | protected StringComparison GetSelectedValueCompareModeFromContext(TagH...
method MarkAsSelected (line 76) | protected virtual void MarkAsSelected(TagHelperOutput output)
method Process (line 88) | public override void Process(TagHelperContext context, TagHelperOutput...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/SelectValueTagHelper.cs
class SelectValueTagHelper (line 10) | [HtmlTargetElement("select", Attributes = ValueAttributeName)]
method Init (line 15) | public override void Init(TagHelperContext context)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/TextSource.cs
type TextSource (line 8) | public enum TextSource
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ViewDataExtensions.cs
class ViewDataExtensions (line 9) | [PublicAPI]
method GetItemOrDefault (line 19) | public static T? GetItemOrDefault<T>(this ViewDataDictionary viewData,...
method GetItemOrDefault (line 34) | public static T GetItemOrDefault<T>(this ViewDataDictionary viewData, ...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/EnhancedSessionStateTempDataProvider.cs
class EnhancedSessionStateTempDataProvider (line 13) | public class EnhancedSessionStateTempDataProvider : SessionStateTempData...
method EnhancedSessionStateTempDataProvider (line 19) | public EnhancedSessionStateTempDataProvider(IObjectSerializer objectSe...
method LoadTempData (line 35) | public override IDictionary<string, object> LoadTempData(HttpContext c...
method SaveTempData (line 48) | public override void SaveTempData(HttpContext context, IDictionary<str...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/HtmlContentConverter.NetCoreApp3.cs
class HtmlContentConverter (line 15) | public class HtmlContentConverter : JsonConverter<IHtmlContent>
method Read (line 18) | public override IHtmlContent Read(ref Utf8JsonReader reader, Type type...
method Write (line 25) | public override void Write(Utf8JsonWriter writer, IHtmlContent value, ...
method CanConvert (line 34) | public override bool CanConvert(Type typeToConvert)
class HtmlContentConverterFactory (line 43) | public class HtmlContentConverterFactory : JsonConverterFactory
method CanConvert (line 48) | public override bool CanConvert(Type typeToConvert)
method CreateConverter (line 54) | public override JsonConverter CreateConverter(Type typeToConvert, Json...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/HtmlContentConverter.cs
class HtmlContentConverter (line 14) | public class HtmlContentConverter : JsonConverter
method WriteJson (line 17) | public override void WriteJson(JsonWriter writer, object value, JsonSe...
method ReadJson (line 34) | public override object ReadJson(JsonReader reader, Type objectType, ob...
method CanConvert (line 45) | public override bool CanConvert(Type objectType)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/IObjectSerializer.cs
type IObjectSerializer (line 6) | public interface IObjectSerializer
method Serialize (line 13) | string Serialize(object obj);
method Deserialize (line 20) | object Deserialize(string obj);
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/JsonObjectSerializer.cs
class JsonObjectSerializer (line 18) | [UsedImplicitly(ImplicitUseKindFlags.InstantiatedNoFixedConstructorSigna...
method JsonObjectSerializer (line 25) | public JsonObjectSerializer(IOptions<TempDataSerializationOptions> opt...
method Deserialize (line 46) | public object Deserialize(string obj)
method Serialize (line 71) | public string Serialize(object obj)
method GenerateOptions (line 105) | private JsonSerializerOptions GenerateOptions()
method GenerateSettings (line 128) | private JsonSerializerSettings GenerateSettings()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/SerializedObjectInfo.cs
class SerializedObjectInfo (line 6) | public class SerializedObjectInfo
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/ServiceCollectionExtensions.cs
class ServiceCollectionExtensions (line 20) | public static class ServiceCollectionExtensions
method AddEnhancedTempData (line 28) | [PublicAPI]
method EnableHtmlContentSerialization (line 66) | [PublicAPI]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/TempDataSerializationOptions.cs
class TempDataSerializationOptions (line 15) | public class TempDataSerializationOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/TypedJsonTempDataSerializer.cs
class TypedJsonTempDataSerializer (line 13) | public class TypedJsonTempDataSerializer : TempDataSerializer
method TypedJsonTempDataSerializer (line 19) | public TypedJsonTempDataSerializer(IObjectSerializer objectSerializer)
method Deserialize (line 30) | public override IDictionary<string, object> Deserialize(byte[] unprote...
method Serialize (line 42) | public override byte[] Serialize(IDictionary<string, object> values)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyle.cs
class VisualStyle (line 8) | public class VisualStyle : IEquatable<VisualStyle>
method VisualStyle (line 26) | public VisualStyle(string framework, string version)
class CommonFrameworks (line 36) | public static class CommonFrameworks
method TryMatch (line 61) | public static VisualStyleMatchType TryMatch(VisualStyle first, VisualS...
method Equals (line 79) | public bool Equals(VisualStyle other)
method Equals (line 87) | public override bool Equals(object obj)
method GetHashCode (line 96) | public override int GetHashCode()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleMatchResult.cs
class VisualStyleMatchResult (line 3) | public class VisualStyleMatchResult(
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleMatchType.cs
type VisualStyleMatchType (line 3) | public enum VisualStyleMatchType
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleOptions.cs
class VisualStyleOptions (line 9) | public class VisualStyleOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleService.cs
class VisualStyleService (line 10) | public class VisualStyleService(IOptions<VisualStyleOptions> options)
method Match (line 14) | public VisualStyleMatchResult Match(IEnumerable<VisualStyle> allowedSt...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/DynamicPagedListExtensions.cs
class DynamicPagedListExtensions (line 9) | [PublicAPI]
method CheckArgument (line 17) | private static void CheckArgument(IDynamicPagedList pagedList)
method GoToFirstPage (line 29) | public static void GoToFirstPage(this IDynamicPagedList pagedList)
method GoToLastPage (line 41) | public static void GoToLastPage(this IDynamicPagedList pagedList)
method GoToPreviousPage (line 57) | public static bool GoToPreviousPage(this IDynamicPagedList pagedList)
method GoToNextPage (line 77) | public static bool GoToNextPage(this IDynamicPagedList pagedList)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/IDynamicPagedList.cs
type IDynamicPagedList (line 8) | public interface IDynamicPagedList : IPagedList
method GoToFirstPage (line 28) | public void GoToFirstPage() => PageIndex = 1;
method GoToLastPage (line 33) | public void GoToLastPage() => PageIndex = TotalPage;
method GoToPreviousPage (line 42) | public bool GoToPreviousPage()
method GoToNextPage (line 58) | public bool GoToNextPage()
type IDynamicPagedList (line 75) | public interface IDynamicPagedList<out T> : IDynamicPagedList, IPagedLis...
method GoToFirstPage (line 28) | public void GoToFirstPage() => PageIndex = 1;
method GoToLastPage (line 33) | public void GoToLastPage() => PageIndex = TotalPage;
method GoToPreviousPage (line 42) | public bool GoToPreviousPage()
method GoToNextPage (line 58) | public bool GoToNextPage()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/IPagedList.cs
type IPagedList (line 10) | public interface IPagedList : IList
type IPagedList (line 60) | public interface IPagedList<out T> : IPagedList, IReadOnlyList<T>
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/PagedListExtensions.cs
class PagedListExtensions (line 11) | [PublicAPI]
method CheckArgument (line 19) | private static void CheckArgument(IPagedList pagedList)
method IsFirstPage (line 32) | public static bool IsFirstPage(this IPagedList pagedList)
method IsLastPage (line 45) | public static bool IsLastPage(this IPagedList pagedList)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Async/AsyncPagedListCreationHelper.cs
class AsyncPagedListCreationHelper (line 14) | [PublicAPI]
method ToPagedListAsync (line 26) | public static Task<PagedList<IQueryable<T>, T>> ToPagedListAsync<T>([N...
method CreatePagedListCoreAsync (line 46) | private static async Task<PagedList<TSource, TElement>> CreatePagedLis...
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/CacheMode.cs
type CacheMode (line 8) | [Flags]
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/Cacheable.cs
class Cacheable (line 11) | public class Cacheable<T> : ICacheControl
method Cacheable (line 31) | public Cacheable(Func<T> getDataCallback, Func<T, T> cacheCallback = n...
method Reload (line 90) | public void Reload()
method Cache (line 99) | public void Cache()
method Uncache (line 109) | public void Uncache()
method DisableAutoRefresh (line 124) | public IDisposable DisableAutoRefresh()
method DefaultCacheCallback (line 135) | private static T DefaultCacheCallback(T item)
method GetDataDirectly (line 144) | public T GetDataDirectly()
method NotifyDismiss (line 152) | public void NotifyDismiss()
method AddAutoRefreshControl (line 166) | internal void AddAutoRefreshControl()
method RemoveAutoRefreshControl (line 174) | internal void RemoveAutoRefreshControl()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DisableAutoRefreshController.cs
class DisableAutoRefreshController (line 8) | internal sealed class DisableAutoRefreshController<T> : IDisposable
method DisableAutoRefreshController (line 14) | public DisableAutoRefreshController(Cacheable<T> cacheObject)
method Dispose (line 36) | private void Dispose(bool disposing)
method Dispose (line 59) | public void Dispose()
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicPagedList.cs
class DynamicPagedList (line 10) | public class DynamicPagedList<T> : DynamicPagedListBase<IEnumerable<T>, T>
method DynamicPagedList (line 19) | public DynamicPagedList(IEnumerable<T> source, int pageSize, int pageI...
method GetTotalCount (line 28) | protected override int GetTotalCount()
method GetCurrentPage (line 37) | protected override IEnumerable<T> GetCurrentPage()
method CacheData (line 47) | protected override IEnumerable<T> CacheData(IEnumerable<T> source)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicPagedListBase.cs
class DynamicPagedListBase (line 16) | public abstract class DynamicPagedListBase<TCollection, TElement> : IPag...
method DynamicPagedListBase (line 28) | protected DynamicPagedListBase(TCollection source, int pageSize, int p...
type Enumerator (line 75) | public struct Enumerator : IEnumerator<TElement>
method Enumerator (line 94) | internal Enumerator([NotNull] DynamicPagedListBase<TCollection, TEle...
method CheckVersion (line 104) | private void CheckVersion()
method MoveNext (line 112) | public bool MoveNext()
method Reset (line 119) | public void Reset()
method Dispose (line 139) | public void Dispose()
method GetTotalCount (line 153) | protected abstract int GetTotalCount();
method GetCurrentPage (line 159) | protected abstract TCollection GetCurrentPage();
method CacheData (line 166) | protected abstract TCollection CacheData(TCollection source);
method IncreaseVersion (line 321) | protected void IncreaseVersion()
method GetEnumerator (line 331) | public IEnumerator<TElement> GetEnumerator()
method GetEnumerator (line 338) | IEnumerator IEnumerable.GetEnumerator()
method Add (line 350) | int IList.Add(object value)
method Clear (line 355) | void IList.Clear()
method Contains (line 360) | bool IList.Contains(object value)
method IndexOf (line 365) | int IList.IndexOf(object value)
method Insert (line 370) | void IList.Insert(int index, object value)
method Remove (line 375) | void IList.Remove(object value)
method RemoveAt (line 380) | void IList.RemoveAt(int index)
method CopyTo (line 389) | void ICollection.CopyTo(Array array, int index)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicPagedListCacheOptions.cs
class DynamicPagedListCacheOptions (line 6) | public class DynamicPagedListCacheOptions
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicQueryablePagedList.cs
class DynamicQueryablePagedList (line 9) | public class DynamicQueryablePagedList<T> : DynamicPagedListBase<IQuerya...
method DynamicQueryablePagedList (line 18) | public DynamicQueryablePagedList(IQueryable<T> source, int pageSize, i...
method GetTotalCount (line 27) | protected override int GetTotalCount()
method GetCurrentPage (line 36) | protected override IQueryable<T> GetCurrentPage()
method CacheData (line 46) | protected override IQueryable<T> CacheData(IQueryable<T> source)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/ICacheControl.cs
type ICacheControl (line 9) | [PublicAPI]
method Cache (line 20) | void Cache();
method Uncache (line 25) | void Uncache();
method Reload (line 30) | void Reload();
method DisableAutoRefresh (line 36) | IDisposable DisableAutoRefresh();
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/PagedList.cs
class PagedList (line 14) | public class PagedList<TSource, TElement> : IPagedList<TElement>
method PagedList (line 44) | public PagedList([NotNull] IList<TElement> currentPage, [NotNull] TSou...
method GetEnumerator (line 122) | IEnumerator<TElement> IEnumerable<TElement>.GetEnumerator()
method GetEnumerator (line 128) | IEnumerator IEnumerable.GetEnumerator()
method CopyTo (line 138) | void ICollection.CopyTo(Array array, int index)
method Add (line 154) | int IList.Add(object value)
method Clear (line 160) | void IList.Clear()
method Contains (line 167) | bool IList.Contains(object value)
method IndexOf (line 174) | int IList.IndexOf(object value)
method Insert (line 181) | void IList.Insert(int index, object value)
method Remove (line 187) | void IList.Remove(object value)
method RemoveAt (line 193) | void IList.RemoveAt(int index)
FILE: Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/PagedListCreationHelper.cs
class PagedListCreationHelper (line 12) | [PublicAPI]
method ToPagedList (line 23) | public static PagedList<IEnumerable<T>, T> ToPagedList<T>([NotNull] th...
method ToPagedList (line 38) | public static PagedList<IQueryable<T>, T> ToPagedList<T>([NotNull] thi...
method CreatePagedListCore (line 57) | private static PagedList<TSource, TElement> CreatePagedListCore<TSourc...
method ToDynamicPagedList (line 89) | public static DynamicPagedList<T> ToDynamicPagedList<T>(this IEnumerab...
method ToDynamicPagedList (line 104) | public static DynamicQueryablePagedList<T> ToDynamicPagedList<T>(this ...
FILE: Sakura.AspNetCore.Extensions/Sakura.EntityFrameworkCore.FromSqlExtensions/DbContextFromSqlExtensions.cs
class DbContextFromSqlExtensions (line 17) | public static class DbContextFromSqlExtensions
method FromSql (line 35) | [PublicAPI]
method FromSql (line 65) | [PublicAPI]
method TryAddQueryType (line 76) | private static void TryAddQueryType<T>(this DbContext dbContext)
Condensed preview — 200 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (577K chars).
[
{
"path": ".gitattributes",
"chars": 2518,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": ".gitignore",
"chars": 3833,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "LICENSE.txt",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "PagerDemo.md",
"chars": 23997,
"preview": "# ASP.NET Core Data Paging and Pager Usage Guide\n\n*Note: here is the guide of version 2. For the version 1 guide, please"
},
{
"path": "PagerDemov1.md",
"chars": 7508,
"preview": "# ASP.NET 5 Data Paging and Pager Usage Guide\n\n*NOTE: This is a documenation old version, we recommend you to use versio"
},
{
"path": "README.md",
"chars": 13638,
"preview": "# ASP.NET Core Utility\n\nThis solution add some useful features for ASP.NET Core projects. All projects in this solution "
},
{
"path": "Sakura.AspNetCore.Extensions/Directory.Build.props",
"chars": 250,
"preview": "<Project>\n <PropertyGroup>\n <LangVersion>latest</LangVersion>\n <Nullable>enable</Nullable>\n <Ch"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/AsyncCacheable.cs",
"chars": 4524,
"preview": "using System;\nusing System.Threading.Tasks;\n\nnamespace Sakura.AspNetCore\n{\n\t/// <summary>\n\t/// Represent as a cacha"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/AsyncPagedList.cs",
"chars": 7248,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n\nnamespace Sakura.AspN"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/IAsyncPagedList.cs",
"chars": 302,
"preview": "using System.Collections.Generic;\nusing System.Threading.Tasks;\n\nnamespace Sakura.AspNetCore\n{\n\tpublic interface IAsync"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/PagedListCreationHelper.cs",
"chars": 1927,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing JetBrains.Annota"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/Properties/Annotations.cs",
"chars": 44456,
"preview": "/* MIT License\n\nCopyright (c) 2016 JetBrains http://www.jetbrains.com\n\nPermission is hereby granted, free of charge, to"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/Properties/AssemblyInfo.cs",
"chars": 803,
"preview": "using System.Reflection;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.AsyncPagedList/Sakura.AspNetCore.AsyncPagedList.csproj",
"chars": 918,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard1.6</TargetFramework>\n <Assembl"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ApplicationBuilderExtensions.cs",
"chars": 1794,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Identity;\n#if"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSecurityStampValidator.cs",
"chars": 1081,
"preview": "using System.Security.Claims;\nusing System.Threading.Tasks;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Aut"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.Net1.cs",
"chars": 3926,
"preview": "#if NET451 || NETSTANDARD1_3\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security."
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.Net2.cs",
"chars": 4553,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.Claims;\nusing System.Threading"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ExternalSignInManager.cs",
"chars": 4787,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Security.Claims;\nusing JetBrains.Annota"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/IdentityHelper.cs",
"chars": 2241,
"preview": "using System;\nusing System.Linq;\nusing System.Security.Claims;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCor"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/Sakura.AspNetCore.Authentication.ExternalCookie.csproj",
"chars": 2452,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>This library is used to simplify the pipeline to "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Authentication.ExternalCookie/ServiceCollectionExtensions.cs",
"chars": 1653,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.Identity;\nusing "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicHtmlLocalizer.cs",
"chars": 1089,
"preview": "using Microsoft.AspNetCore.Mvc.Localization;\n\nnamespace Sakura.AspNetCore.Localization;\n\n/// <summary>\n/// Define t"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicStringLocalizer.cs",
"chars": 942,
"preview": "using Microsoft.Extensions.Localization;\n\nnamespace Sakura.AspNetCore.Localization;\n\n/// <summary>\n/// Provide stro"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/IDynamicViewLocalizer.cs",
"chars": 443,
"preview": "using Microsoft.AspNetCore.Mvc.Localization;\n\nnamespace Sakura.AspNetCore.Localization;\n\n/// <summary>\n/// Provide d"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlLocalizer.cs",
"chars": 1868,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.Localization;\n\nnamespace Sakura.AspNetCore.Lo"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlLocalizerWrapper.cs",
"chars": 1905,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Dynamic;\nusing System.Linq;\nusing JetBrains.Annotations;\nus"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicHtmlTextLocalizerWrapper.cs",
"chars": 1943,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Dynamic;\nusing System.Linq;\nusing JetBrains.Annotations;\nus"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicStringLocalizer.cs",
"chars": 1776,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.Extensions.Localization;\n\nnamespace Sakura.AspNetCore.Locali"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicStringLocalizerWrapper.cs",
"chars": 1794,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Dynamic;\nusing System.Linq;\nusing Microsoft.Extensions.Loc"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/DynamicViewLocalizer.cs",
"chars": 1015,
"preview": "using JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.Localization;\nusing Microsoft.AspNetCore.Mvc.Rendering;\nusin"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Internal/IDynamicLocalizerWrapper.cs",
"chars": 335,
"preview": "using System.Dynamic;\n\nnamespace Sakura.AspNetCore.Localization.Internal;\n\n/// <summary>\n/// Provide common base int"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/Sakura.AspNetCore.DynamicLocalizer.csproj",
"chars": 1650,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<TargetFrameworks>netstandard1.6;netcoreapp3.0</TargetFrameworks>"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.DynamicLocalizer/ServiceCollectionExtensions.cs",
"chars": 1011,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.D"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Extensions.sln",
"chars": 8666,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.3.3281"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Extensions.sln.DotSettings",
"chars": 412,
"preview": "<wpf:ResourceDictionary xml:space=\"preserve\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:s=\"clr-namesp"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Localization.Dictionary/DictionaryStringLocalizer.cs",
"chars": 1429,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Text;\nusing Microsoft.Extensio"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Localization.Dictionary/Sakura.AspNetCore.Localization.Dictionary.csproj",
"chars": 332,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard1.4</TargetFramework>\n <RootNam"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/DefaultOperationMessageAccessor.cs",
"chars": 2894,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Http;\nusing Mic"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/OperationMessageOptions.cs",
"chars": 1412,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore;\n\n/// <summar"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/OperationMessageServiceCollectionExtensions.cs",
"chars": 2449,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.DependencyInject"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages/Sakura.AspNetCore.Messages.csproj",
"chars": 2113,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>This library contains the default implementation "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/IOperationMessageAccessor.cs",
"chars": 454,
"preview": "using System.Collections.Generic;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Provide the service for getting "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessage.cs",
"chars": 1370,
"preview": "using JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Repr"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessageExtensions.cs",
"chars": 2498,
"preview": "using System;\nusing System.Collections.Generic;\n\nusing JetBrains.Annotations;\n\nusing Microsoft.AspNetCore.Html;\n\nnamesp"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/OperationMessageLevel.cs",
"chars": 1132,
"preview": "namespace Sakura.AspNetCore;\n\n/// <summary>\n/// Define the level of messages.\n/// </summary>\n/// <seealso cref=\"Ope"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Messages.Abstractions/Sakura.AspNetCore.Messages.Abstractions.csproj",
"chars": 1889,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>This library contains the operation message type "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/ActionResultException.cs",
"chars": 3682,
"preview": "using System;\nusing System.Net;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/EnableActionResultExceptionAttribute.cs",
"chars": 511,
"preview": "using Microsoft.AspNetCore.Mvc.Filters;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Enable special handlin"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/Properties/AssemblyInfo.cs",
"chars": 812,
"preview": "using System.Reflection;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions.csproj",
"chars": 1952,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>This library classes and helper methods which can"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.ActionResultExceptionExtensions/ServiceExtensions.cs",
"chars": 1551,
"preview": "using System;\nusing Microsoft.AspNetCore.Mvc;\nusing Microsoft.AspNetCore.Mvc.Filters;\n\nnamespace Sakura.AspNetCore.Mvc;"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/CssClassBasedIconMapper.cs",
"chars": 1821,
"preview": "using Microsoft.AspNetCore.Html;\nusing Microsoft.AspNetCore.Mvc.Rendering;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summ"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IIconMapper.cs",
"chars": 630,
"preview": "using Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Used to map an <see cref=\"Operati"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IIconToCssClassMapper.cs",
"chars": 633,
"preview": "using System.Runtime.InteropServices.ComTypes;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Used to map an <see"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IOperationMessageHtmlGenerator.cs",
"chars": 782,
"preview": "using System.Collections.Generic;\n\nusing Microsoft.AspNetCore.Html;\nusing Microsoft.AspNetCore.Razor.TagHelpers;\n\nnames"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/IOperationMessageLevelToStyleMapper.cs",
"chars": 688,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Provide methods to convert <see cref=\"OperationMessageLevel\" />"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5AlertMessageContentLayout.cs",
"chars": 683,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Control the layout of the title and content in a Bo"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5AlertMessageHtmlGenerator.cs",
"chars": 4099,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing Microsoft.AspNetCore.Html;\nusing Microsoft.As"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5AlertMessageHtmlGeneratorOptions.cs",
"chars": 1000,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Provide options for <see cref=\"Bootstrap5AlertMessa"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5MessagesServiceBuilder.cs",
"chars": 520,
"preview": "using Microsoft.Extensions.DependencyInjection;\n\nnamespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Us"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5ToastMessageHtmlGenerator.cs",
"chars": 4177,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nusing Microsoft.AspNetCore.Html;"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Bootstrap5ToastMessageHtmlGeneratorOptions.cs",
"chars": 632,
"preview": "using System;\n\nnamespace Sakura.AspNetCore.Mvc.Implementations;\n\npublic record Bootstrap5ToastMessageHtmlGeneratorOptio"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapBuilderExtensions.cs",
"chars": 3516,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing Microsoft.Extensions.DependencyInjection;\nusin"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapIconCssClassMapperOptions.cs",
"chars": 564,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Used to configure the options for the <see cref=\"Bo"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapIconMapper.cs",
"chars": 427,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Provide default implementation for <see cref=\"IIcon"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/BootstrapIconStyle.cs",
"chars": 374,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Get or set the style of the Bootstrap icon.\n/// </s"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/DefaultBootstrap5OperationMessageLevelToStyleMapper.cs",
"chars": 792,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Provides the default implementation of <see cref=\"I"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/DefaultBootstrapIconCssClassMapper.cs",
"chars": 1281,
"preview": "using Microsoft.Extensions.Options;\n\nnamespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Provide the de"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/HorizontalAlignment.cs",
"chars": 118,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\npublic enum HorizontalAlignment\n{\n Left,\n Center,\n Right\n}"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/IBootstrapIconServiceBuilder.cs",
"chars": 360,
"preview": "using Microsoft.Extensions.DependencyInjection;\n\nnamespace Sakura.AspNetCore.Mvc.Implementations;\n\n/// <summary>\n/// Re"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/Utility.cs",
"chars": 1566,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nusing Microsoft.AspNetCore.Mvc.Rendering;\n\nnamespac"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Implementations/VerticalAlignment.cs",
"chars": 116,
"preview": "namespace Sakura.AspNetCore.Mvc.Implementations;\n\npublic enum VerticalAlignment\n{\n Top,\n Middle,\n Bottom\n}"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/MessageTagHelper.cs",
"chars": 1363,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Razor.TagHelpers;\n\nnamespace Sakura.AspNetCore.Mv"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/OperationMessageServiceBuilder.cs",
"chars": 533,
"preview": "using Microsoft.Extensions.DependencyInjection;\n\nnamespace Microsoft.Framework.DependencyInjection;\n\n/// <summary>\n/// "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/Sakura.AspNetCore.Mvc.Messages.csproj",
"chars": 2337,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<Description>This library provides HTML generator and tag helpers"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/ServiceCollectionExtensions.cs",
"chars": 990,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.D"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.Messages/StaticIIconToCssClassMapper.cs",
"chars": 849,
"preview": "using System.Collections.Frozen;\nusing System.Collections.Generic;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/FirstAndLastPagerItemActiveMode.cs",
"chars": 604,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Define how to active the fist and last item in a pager.\n/// </s"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/BaseUriLinkGenerator.cs",
"chars": 3302,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Http.Extensions;\nusing Microsoft.AspNetCore.Mvc.R"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomHtmlContentGenerator.cs",
"chars": 1292,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore.Mvc.Generators"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomLinkGenerator.cs",
"chars": 1108,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc.Gener"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomQueryStringLinkGenerator.cs",
"chars": 2410,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc.Gener"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomQueryValueLinkGenerator.cs",
"chars": 1643,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc.Gener"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/CustomStringContentGenerator.cs",
"chars": 1513,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore.Mvc.Generators"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/DisabledLinkGenerator.cs",
"chars": 499,
"preview": "using Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc.Generators;\n\n/// <summary>\n/// This type is "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FormattedLinkGenerator.cs",
"chars": 1782,
"preview": "using System;\nusing System.Globalization;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FormattedQueryValueLinkGenerator.cs",
"chars": 2144,
"preview": "using System;\nusing System.Globalization;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FormattedStringContentGenerator.cs",
"chars": 2009,
"preview": "using System;\nusing System.Globalization;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\n\nnamespace Saku"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/FragmentLinkGenerator.cs",
"chars": 1411,
"preview": "using System;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore.Mvc.Generators;\n\n/// <summary>\n/// Generate"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/QueryStringLinkGenerator.cs",
"chars": 3182,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Http.Extensions"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/QueryValueLinkGenerator.cs",
"chars": 1391,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc.Gener"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/SimpleLinkGenerator.cs",
"chars": 1065,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc.Gener"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/SimpleQueryValueLinkGenerator.cs",
"chars": 1566,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc.Gener"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/SimpleStringContentGenerator.cs",
"chars": 1330,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore.Mvc.Generators"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Generators/StringContentGenerator.cs",
"chars": 1645,
"preview": "using JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.A"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/IPagerItemContentGenerator.cs",
"chars": 631,
"preview": "using System.ComponentModel;\nusing Microsoft.AspNetCore.Html;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.A"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/IPagerItemLinkGenerator.cs",
"chars": 566,
"preview": "using System.ComponentModel;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNe"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/BootstrapPagerHtmlGenerator.cs",
"chars": 6557,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\nusing Mic"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/DefaultPagerGenerator.cs",
"chars": 2018,
"preview": "using System.Linq;\nusing Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// D"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/DefaultPagerListGenerator.cs",
"chars": 7039,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <sum"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/DefaultPagerRenderingListGenerator.cs",
"chars": 6490,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Collections.ObjectModel;\n\nnamespace Sakura.AspNetCore.Mvc."
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerGenerator.cs",
"chars": 513,
"preview": "using Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Define the necessary"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerHtmlGenerator.cs",
"chars": 644,
"preview": "using Microsoft.AspNetCore.Html;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Define the feature n"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerListGenerator.cs",
"chars": 532,
"preview": "namespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Define the necessary features used to generate a <see "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/IPagerRenderingListGenerator.cs",
"chars": 846,
"preview": "namespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Define necessary feature used to genearte a <see cref="
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerGenerationContext.cs",
"chars": 1742,
"preview": "using Microsoft.AspNetCore.Mvc.Rendering;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Provide nec"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItem.cs",
"chars": 908,
"preview": "using System.Collections.Generic;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItemContentGeneratorConverter.cs",
"chars": 1563,
"preview": "using System;\nusing System.ComponentModel;\nusing System.Globalization;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItemLinkGeneratorConverter.cs",
"chars": 1483,
"preview": "using System;\nusing System.ComponentModel;\nusing System.Globalization;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerItemType.cs",
"chars": 832,
"preview": "namespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Represent as the type of a paged list pager item.\n/// "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerLayoutConverter.cs",
"chars": 1418,
"preview": "using System;\nusing System.ComponentModel;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text.RegularExpr"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerList.cs",
"chars": 623,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerRenderingItem.cs",
"chars": 1294,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\n\nnamespace"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerRenderingItemState.cs",
"chars": 519,
"preview": "namespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Represent as the state for a paged list pager item.\n//"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/PagerRenderingList.cs",
"chars": 493,
"preview": "using System.Collections.Generic;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;\n\n/// <summary>\n/// Represent as the vi"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/StringToHtmlContentConverter.cs",
"chars": 899,
"preview": "using Microsoft.AspNetCore.Html;\nusing Microsoft.AspNetCore.Mvc.ViewFeatures;\n\nnamespace Sakura.AspNetCore.Mvc.Internal"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Internal/Utility.cs",
"chars": 1516,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore.Mvc.Internal;"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerGenerationMode.cs",
"chars": 388,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Define the HTML generation mode of a pager related tag.\n/// </s"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemContentGenerators.cs",
"chars": 10622,
"preview": "using System;\nusing System.Globalization;\nusing System.Text.RegularExpressions;\nusing JetBrains.Annotations;\nusing Micr"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemGenerationContext.cs",
"chars": 1409,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n///"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemLinkGenerators.cs",
"chars": 6641,
"preview": "using System;\nusing System.Globalization;\nusing System.Text.RegularExpressions;\nusing JetBrains.Annotations;\nusing Saku"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemMode.cs",
"chars": 711,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Define the working mode for a pager item.\n/// </summary>\npublic"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemOptions.cs",
"chars": 3989,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n//"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerItemOptionsSet.cs",
"chars": 7959,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\nusing Sakura.AspNetCore.Mvc.Internal;\n\nnam"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerLayout.cs",
"chars": 988,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Collections.ObjectModel;\nusing System.ComponentModel;\nusin"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerLayoutElement.cs",
"chars": 605,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Define the layout element for a paged list pager.\n/// </summary"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerLayouts.cs",
"chars": 2614,
"preview": "using System.Collections.Generic;\nusing System.Collections.ObjectModel;\nusing System.Linq;\nusing JetBrains.Annotations;"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerOptions.cs",
"chars": 2762,
"preview": "using System;\nusing System.Collections.Generic;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Contain all op"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/PagerOptionsExtensions.cs",
"chars": 1705,
"preview": "using System;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Provide extension m"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/Sakura.AspNetCore.Mvc.PagedList.csproj",
"chars": 2235,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<Description>This library provides data-paging functionality and "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/ServiceCollectionExtensions.cs",
"chars": 1486,
"preview": "using System;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.DependencyInjection.Extensions"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/SpecialPagerItemInactiveBehavior.cs",
"chars": 379,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Control how to handle inactive special pager items.\n/// </summa"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/AjaxOptions.cs",
"chars": 221,
"preview": "namespace Sakura.AspNetCore.Mvc.TagHelpers;\n\n/// <summary>\n/// Provide the AJAX options.\n/// </summary>\npublic clas"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/AjaxUpdateMode.cs",
"chars": 528,
"preview": "namespace Sakura.AspNetCore.Mvc.TagHelpers;\n\n/// <summary>\n/// Define the update mode for AJAX operation results.\n/"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/PagerTagHelper.cs",
"chars": 15004,
"preview": "using System;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.Rendering;\n"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.PagedList/TagHelpers/TagHelperUtility.cs",
"chars": 843,
"preview": "using System;\nusing Microsoft.AspNetCore.Razor.TagHelpers;\n\nnamespace Sakura.AspNetCore.Mvc.TagHelpers;\n\n/// <summary>\n"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/AuthorizeAttributeTagHelper.cs",
"chars": 1841,
"preview": "using System.Security.Claims;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.As"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/AuthorizeTagHelper.cs",
"chars": 2266,
"preview": "using System.Security.Claims;\nusing System.Threading.Tasks;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Aut"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/AuthorizeTagHelperBase.cs",
"chars": 2816,
"preview": "using System.Security.Claims;\nusing System.Threading.Tasks;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Aut"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ConditionalClassTagHelper.cs",
"chars": 2569,
"preview": "using JetBrains.Annotations;\n\nusing Microsoft.AspNetCore.Razor.TagHelpers;\n\nusing System.Collections.Generic;\nusing Sys"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/DisplayTextTagHelper.cs",
"chars": 2826,
"preview": "using System;\nusing System.Reflection;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.ModelBinding.Metadat"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumForSelectTagHelper.cs",
"chars": 3207,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.Rendering;\nusing Microsoft.AspNetCore.Mvc.Tag"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumOptionValueSource.cs",
"chars": 433,
"preview": "namespace Sakura.AspNetCore.Mvc.TagHelpers;\n\n/// <summary>\n/// Define the value source for <see cref=\"EnumSelectTag"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumSelectTagHelper.cs",
"chars": 4537,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing JetBrains.Annotations"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumTypeSelectTagHelper.cs",
"chars": 3349,
"preview": "using System;\nusing System.Linq;\nusing System.Reflection;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Razor"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/EnumValueTextHelper.cs",
"chars": 3624,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.ViewFeatures;\nusing Microsoft.AspNetCore.Razo"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumInputTagHelper.cs",
"chars": 3482,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.TagHelpers;\nusing Microsoft.AspNetCore.Mvc.Vi"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumModelBinder.cs",
"chars": 2660,
"preview": "using System;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Mvc.ModelBinding;\n\nnamespace "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumModelBinderProvider.cs",
"chars": 885,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.ModelBinding;\n\nnamespace Sakura.AspNetCore.Mv"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/FlagsEnumModelBinderServiceCollectionExtensions.cs",
"chars": 4451,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetC"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/HtmlGeneratorHelper.cs",
"chars": 3416,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.AspNetCore.Html;\nusing Microsoft.AspNetCore.Mvc.Re"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/IdFormatTagHelper.cs",
"chars": 3262,
"preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Globalization;\nusing Microsoft.AspNetCore.Mvc.Rendering"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/OptionLabelPosition.cs",
"chars": 375,
"preview": "namespace Sakura.AspNetCore.Mvc.TagHelpers;\n\n/// <summary>\n/// Define the appearing location of the optional label "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/PartialViewItemTagHelper.cs",
"chars": 1855,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetC"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ReflectionHelper.cs",
"chars": 3507,
"preview": "using System;\nusing System.ComponentModel.DataAnnotations;\nusing System.Globalization;\nusing System.Reflection;\nusing J"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ResourceHelper.cs",
"chars": 903,
"preview": "using Microsoft.Extensions.Localization;\n\nnamespace Sakura.AspNetCore.Mvc.TagHelpers;\n\n/// <summary>\n/// Provide he"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/Sakura.AspNetCore.Mvc.TagHelpers.csproj",
"chars": 2527,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>ASP.NET Core MVC Extensions Library provide"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/SelectOptionLabelTagHelper.cs",
"chars": 2394,
"preview": "using System;\nusing Microsoft.AspNetCore.Mvc.Rendering;\nusing Microsoft.AspNetCore.Razor.TagHelpers;\n\nnamespace Sakura."
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/SelectValueOptionTagHelper.cs",
"chars": 4028,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Razor.TagHelpers;\n\nnamespace Sakura.AspNetCore.Mv"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/SelectValueTagHelper.cs",
"chars": 1653,
"preview": "using System;\nusing JetBrains.Annotations;\nusing Microsoft.AspNetCore.Razor.TagHelpers;\n\nnamespace Sakura.AspNetCore.Mv"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/TextSource.cs",
"chars": 1049,
"preview": "using System.ComponentModel.DataAnnotations;\n\nnamespace Sakura.AspNetCore.Mvc.TagHelpers;\n\n/// <summary>\n/// Define"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TagHelpers/ViewDataExtensions.cs",
"chars": 2334,
"preview": "using JetBrains.Annotations;\nusing Microsoft.AspNetCore.Mvc.ViewFeatures;\n\nnamespace Sakura.AspNetCore.Mvc.TagHelpers;\n"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/EnhancedSessionStateTempDataProvider.cs",
"chars": 2121,
"preview": "#if !NETCOREAPP3_0\nusing System.Collections.Generic;\nusing System.Linq;\nusing JetBrains.Annotations;\nusing Microsoft.As"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/HtmlContentConverter.NetCoreApp3.cs",
"chars": 1626,
"preview": "#if NETCOREAPP3_0\nusing System;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Text.Encodings.Web;\nusing Syste"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/HtmlContentConverter.cs",
"chars": 1137,
"preview": "#if !NETCOREAPP3_0\nusing System;\nusing System.IO;\nusing System.Reflection;\nusing System.Text.Encodings.Web;\nusing Micro"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/IObjectSerializer.cs",
"chars": 612,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Define the serialization service for arbitrary object.\n/// </su"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/JsonObjectSerializer.cs",
"chars": 3828,
"preview": "using System;\n\nusing JetBrains.Annotations;\n\nusing Microsoft.Extensions.Options;\n\n#if NETCOREAPP3_0\nusing System.Text.J"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/Sakura.AspNetCore.Mvc.TempDataExtensions.csproj",
"chars": 2288,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<LangVersion>latest</LangVersion>\n\t\t<Description>This package add"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/SerializedObjectInfo.cs",
"chars": 377,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Represents as the information for a serialized object.\n/// </su"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/ServiceCollectionExtensions.cs",
"chars": 2843,
"preview": "using JetBrains.Annotations;\nusing Microsoft.AspNetCore.Html;\nusing Microsoft.Extensions.DependencyInjection.Extensions"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/TempDataSerializationOptions.cs",
"chars": 631,
"preview": "using System.Collections.Generic;\nusing System.Collections.ObjectModel;\n\n#if NETCOREAPP3_0\nusing JsonConverter = System"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.TempDataExtensions/TypedJsonTempDataSerializer.cs",
"chars": 1647,
"preview": "#if NETCOREAPP3_0\nusing System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Microsoft.AspNetCore.Mv"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/Sakura.AspNetCore.Mvc.VisualStyles.csproj",
"chars": 305,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard2.0</TargetFramework>\n <RootName"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyle.cs",
"chars": 3240,
"preview": "using System;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary>\n/// Define the common visual style names. This class is "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleMatchResult.cs",
"chars": 365,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\npublic class VisualStyleMatchResult(\n VisualStyle requiredStyle,\n VisualStyle s"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleMatchType.cs",
"chars": 107,
"preview": "namespace Sakura.AspNetCore.Mvc;\n\npublic enum VisualStyleMatchType\n{\n None,\n Framework,\n Exact,\n}"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleOptions.cs",
"chars": 616,
"preview": "using System.Collections.Generic;\nusing System.Collections.ObjectModel;\n\nnamespace Sakura.AspNetCore.Mvc;\n\n/// <summary"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.Mvc.VisualStyles/VisualStyleService.cs",
"chars": 808,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.Extensions.Options;\n\nnamespace Sakura.AspNetCore.M"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/CacheMode.cs",
"chars": 552,
"preview": "using System;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Define the execution policy for caching features.\n//"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/Cacheable.cs",
"chars": 5285,
"preview": "using System;\nusing System.Threading;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Represent as a cachable data"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DisableAutoRefreshController.cs",
"chars": 1529,
"preview": "using System;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Controller object used to disable auto refreshing. T"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicPagedList.cs",
"chars": 1659,
"preview": "using System.Collections.Generic;\nusing System.Linq;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Represent as "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicPagedListBase.cs",
"chars": 9795,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nus"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicPagedListCacheOptions.cs",
"chars": 446,
"preview": "namespace Sakura.AspNetCore;\n\n/// <summary>\n/// Define additional creation options when create a paged list.\n/// </"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/DynamicQueryablePagedList.cs",
"chars": 1703,
"preview": "using System.Linq;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Represent as a paged list created from <see cre"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/ICacheControl.cs",
"chars": 825,
"preview": "using System;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Define caching manageme"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/PagedList.cs",
"chars": 5380,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Collections.ObjectModel;\nusing J"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/PagedListCreationHelper.cs",
"chars": 5630,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing JetBrains.Annotations;\n\n// ReSharper disable P"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList/Sakura.AspNetCore.PagedList.csproj",
"chars": 1744,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>ASP.NET Core PagedList core library provides data"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/DynamicPagedListExtensions.cs",
"chars": 2633,
"preview": "using System;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Provide additional exte"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/IDynamicPagedList.cs",
"chars": 1871,
"preview": "using JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore;\n\n/// <summary>\n/// Define as a <see cref=\"IPagedList\" /> "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/IPagedList.cs",
"chars": 1805,
"preview": "using System.Collections;\nusing System.Collections.Generic;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore;\n"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/PagedListExtensions.cs",
"chars": 1847,
"preview": "using System;\nusing JetBrains.Annotations;\n\nnamespace Sakura.AspNetCore;\n\n// Features are provided by interface default"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Abstractions/Sakura.AspNetCore.PagedList.Abstractions.csproj",
"chars": 1875,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>ASP.NET Core PagedList abstraction layer defines "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Async/AsyncPagedListCreationHelper.cs",
"chars": 3163,
"preview": "using System;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing JetBrains.Annotations;\nusi"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.AspNetCore.PagedList.Async/Sakura.AspNetCore.PagedList.Async.csproj",
"chars": 1894,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <Description>This package provides extension method to create "
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.EntityFrameworkCore.FromSqlExtensions/DbContextFromSqlExtensions.cs",
"chars": 3693,
"preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Reflection;\nusing JetBrains.Annotations;\nu"
},
{
"path": "Sakura.AspNetCore.Extensions/Sakura.EntityFrameworkCore.FromSqlExtensions/Sakura.EntityFrameworkCore.FromSqlExtensions.csproj",
"chars": 1149,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFrameworks>netstandard2.0</TargetFrameworks>\n <Autho"
},
{
"path": "TagHelperDemo.md",
"chars": 18970,
"preview": "# ASP.NET Core Tag Helper Extension Library Usage Guideline\n\nASP.NET Core uses a new coding writing design mode named `T"
}
]
About this extraction
This page contains the full source code of the sgjsakura/AspNetCore GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 200 files (508.1 KB), approximately 132.4k tokens, and a symbol index with 704 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.