├── .gitattributes ├── .gitignore ├── 999-Others ├── 999-Others.sln ├── NET6 │ ├── NET6Extensions │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── NET6Extensions.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── RegisterStartupMiddlewares.cs │ │ ├── RegisterStartupServices.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── NET6Startup │ │ ├── Controllers │ │ └── WeatherForecastController.cs │ │ ├── NET6Startup.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── OvOv.StopWords │ ├── Controllers │ │ └── WordController.cs │ ├── OvOv.StopWords.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── Utils │ │ ├── StopWords.cs │ │ ├── TcpClientHttpRequest.cs │ │ └── ToolGoodUtils.cs │ ├── _Illegal │ │ ├── IllegalBit.iws │ │ ├── IllegalInfo.txt │ │ ├── IllegalKeywords.txt │ │ └── IllegalUrls.txt │ ├── appsettings.Development.json │ └── appsettings.json ├── Qiniu │ ├── OvOv.MQiniu.Core │ │ ├── Controllers │ │ │ └── QiniuController.cs │ │ ├── Dockerfile │ │ ├── Models │ │ │ └── ResultDto.cs │ │ ├── OvOv.MQiniu.Core.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── publish.bat │ └── QiniuDownload │ │ ├── Program.cs │ │ └── QiniuDownload.csproj ├── README.md ├── console-hello-world │ ├── Program.cs │ └── console-hello-world.csproj └── console-news-types │ ├── src │ └── NewTypes │ │ ├── NewTypes.csproj │ │ ├── Pets │ │ ├── Cat.cs │ │ ├── Dog.cs │ │ └── IPet.cs │ │ └── Program.cs │ └── test │ └── NewTypesTests │ ├── NewTypesTests.csproj │ └── PetTests.cs ├── API └── WebApiClient │ ├── OvOv.WebApiClient.sln │ ├── README.md │ └── WeChat.Mp │ ├── Controllers │ └── ValuesController.cs │ ├── Dockerfile │ ├── IMyWebApi.cs │ ├── OvOv.WeChat.Mp.csproj │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── ResultMsg.cs │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── Application-Frameworks └── CAP │ ├── OvOv.CAP.sln │ └── OvOv.CAP │ ├── Controllers │ └── CapController.cs │ ├── OvOv.CAP.csproj │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── Authentication-and-Authorization ├── .dockerignore ├── ApiService │ ├── ApiService.csproj │ ├── ApiService.xml │ ├── Controllers │ │ └── ValuesController.cs │ ├── Dockerfile │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── IdentityServer4.sln ├── IdentityServer4 │ ├── Dockerfile │ ├── IdentityServer4.Service.csproj │ ├── IdentityServer4.Service.xml │ ├── InMemoryConfiguration.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Quickstart │ │ ├── Account │ │ │ ├── AccountController.cs │ │ │ ├── AccountOptions.cs │ │ │ ├── ExternalController.cs │ │ │ ├── ExternalProvider.cs │ │ │ ├── LoggedOutViewModel.cs │ │ │ ├── LoginInputModel.cs │ │ │ ├── LoginViewModel.cs │ │ │ ├── LogoutInputModel.cs │ │ │ ├── LogoutViewModel.cs │ │ │ └── RedirectViewModel.cs │ │ ├── Consent │ │ │ ├── ConsentController.cs │ │ │ ├── ConsentInputModel.cs │ │ │ ├── ConsentOptions.cs │ │ │ ├── ConsentViewModel.cs │ │ │ ├── ProcessConsentResult.cs │ │ │ └── ScopeViewModel.cs │ │ ├── Device │ │ │ ├── DeviceAuthorizationInputModel.cs │ │ │ ├── DeviceAuthorizationViewModel.cs │ │ │ └── DeviceController.cs │ │ ├── Diagnostics │ │ │ ├── DiagnosticsController.cs │ │ │ └── DiagnosticsViewModel.cs │ │ ├── Extensions.cs │ │ ├── Grants │ │ │ ├── GrantsController.cs │ │ │ └── GrantsViewModel.cs │ │ ├── Home │ │ │ ├── ErrorViewModel.cs │ │ │ └── HomeController.cs │ │ ├── SecurityHeadersAttribute.cs │ │ └── TestUsers.cs │ ├── Startup.cs │ ├── Views │ │ ├── Account │ │ │ ├── AccessDenied.cshtml │ │ │ ├── LoggedOut.cshtml │ │ │ ├── Login.cshtml │ │ │ └── Logout.cshtml │ │ ├── Consent │ │ │ └── Index.cshtml │ │ ├── Device │ │ │ ├── Success.cshtml │ │ │ ├── UserCodeCapture.cshtml │ │ │ └── UserCodeConfirmation.cshtml │ │ ├── Diagnostics │ │ │ └── Index.cshtml │ │ ├── Grants │ │ │ └── Index.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ ├── Redirect.cshtml │ │ │ ├── _Layout.cshtml │ │ │ ├── _Nav.cshtml │ │ │ ├── _ScopeListItem.cshtml │ │ │ └── _ValidationSummary.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── tempkey.rsa │ └── wwwroot │ │ ├── css │ │ ├── site.css │ │ ├── site.less │ │ ├── site.min.css │ │ └── site.scss │ │ ├── favicon.ico │ │ ├── icon.jpg │ │ ├── icon.png │ │ ├── js │ │ ├── signin-redirect.js │ │ └── signout-redirect.js │ │ └── lib │ │ ├── bootstrap │ │ ├── LICENSE │ │ ├── README.md │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ └── bootstrap.min.css │ │ ├── dist │ │ │ ├── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── js │ │ │ │ ├── bootstrap.bundle.js │ │ │ │ ├── bootstrap.bundle.js.map │ │ │ │ ├── bootstrap.bundle.min.js │ │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.js.map │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── bootstrap.min.js.map │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ │ └── scss │ │ │ ├── _alert.scss │ │ │ ├── _badge.scss │ │ │ ├── _breadcrumb.scss │ │ │ ├── _button-group.scss │ │ │ ├── _buttons.scss │ │ │ ├── _card.scss │ │ │ ├── _carousel.scss │ │ │ ├── _close.scss │ │ │ ├── _code.scss │ │ │ ├── _custom-forms.scss │ │ │ ├── _dropdown.scss │ │ │ ├── _forms.scss │ │ │ ├── _functions.scss │ │ │ ├── _grid.scss │ │ │ ├── _images.scss │ │ │ ├── _input-group.scss │ │ │ ├── _jumbotron.scss │ │ │ ├── _list-group.scss │ │ │ ├── _media.scss │ │ │ ├── _mixins.scss │ │ │ ├── _modal.scss │ │ │ ├── _nav.scss │ │ │ ├── _navbar.scss │ │ │ ├── _pagination.scss │ │ │ ├── _popover.scss │ │ │ ├── _print.scss │ │ │ ├── _progress.scss │ │ │ ├── _reboot.scss │ │ │ ├── _root.scss │ │ │ ├── _spinners.scss │ │ │ ├── _tables.scss │ │ │ ├── _toasts.scss │ │ │ ├── _tooltip.scss │ │ │ ├── _transitions.scss │ │ │ ├── _type.scss │ │ │ ├── _utilities.scss │ │ │ ├── _variables.scss │ │ │ ├── bootstrap-grid.scss │ │ │ ├── bootstrap-reboot.scss │ │ │ ├── bootstrap.scss │ │ │ ├── mixins │ │ │ ├── _alert.scss │ │ │ ├── _background-variant.scss │ │ │ ├── _badge.scss │ │ │ ├── _border-radius.scss │ │ │ ├── _box-shadow.scss │ │ │ ├── _breakpoints.scss │ │ │ ├── _buttons.scss │ │ │ ├── _caret.scss │ │ │ ├── _clearfix.scss │ │ │ ├── _deprecate.scss │ │ │ ├── _float.scss │ │ │ ├── _forms.scss │ │ │ ├── _gradients.scss │ │ │ ├── _grid-framework.scss │ │ │ ├── _grid.scss │ │ │ ├── _hover.scss │ │ │ ├── _image.scss │ │ │ ├── _list-group.scss │ │ │ ├── _lists.scss │ │ │ ├── _nav-divider.scss │ │ │ ├── _pagination.scss │ │ │ ├── _reset-text.scss │ │ │ ├── _resize.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _size.scss │ │ │ ├── _table-row.scss │ │ │ ├── _text-emphasis.scss │ │ │ ├── _text-hide.scss │ │ │ ├── _text-truncate.scss │ │ │ ├── _transition.scss │ │ │ └── _visibility.scss │ │ │ ├── utilities │ │ │ ├── _align.scss │ │ │ ├── _background.scss │ │ │ ├── _borders.scss │ │ │ ├── _clearfix.scss │ │ │ ├── _display.scss │ │ │ ├── _embed.scss │ │ │ ├── _flex.scss │ │ │ ├── _float.scss │ │ │ ├── _overflow.scss │ │ │ ├── _position.scss │ │ │ ├── _screenreaders.scss │ │ │ ├── _shadows.scss │ │ │ ├── _sizing.scss │ │ │ ├── _spacing.scss │ │ │ ├── _stretched-link.scss │ │ │ ├── _text.scss │ │ │ └── _visibility.scss │ │ │ └── vendor │ │ │ └── _rfs.scss │ │ └── jquery │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── dist │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ ├── jquery.slim.js │ │ ├── jquery.slim.min.js │ │ └── jquery.slim.min.map │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map ├── README.md ├── aspnetcore-oatuth2 │ ├── .dockerignore │ ├── OvOv.AspNetCore.OAuth2.MVC │ │ ├── Controllers │ │ │ ├── AuthenticationController.cs │ │ │ └── HomeController.cs │ │ ├── Dockerfile │ │ ├── Extensions │ │ │ └── HttpContextExtensions.cs │ │ ├── OvOv.AspNetCore.OAuth2.MVC.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── Views │ │ │ ├── Authentication │ │ │ │ └── SignIn.cshtml │ │ │ ├── Home │ │ │ │ └── Index.cshtml │ │ │ ├── Shared │ │ │ │ └── _Layout.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── OvOv.AspNetCore.OAuth2.WebAPI │ │ ├── Controllers │ │ │ └── AuthenticationController.cs │ │ ├── Dockerfile │ │ ├── Extensions │ │ │ ├── HttpContextExtensions.cs │ │ │ └── JwtConfiguration.cs │ │ ├── LinConsts.cs │ │ ├── OvOv.AspNetCore.OAuth2.WebAPI.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── VoVo.AspNetCore.OAuth2.sln │ ├── docker-compose.dcproj │ ├── docker-compose.override.yml │ ├── docker-compose.yml │ └── spa-vue-oauth2 │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ └── LoginResult.vue │ │ ├── config │ │ │ └── index.js │ │ └── main.js │ │ ├── vue.config.js │ │ └── yarn.lock ├── docker-compose.dcproj ├── docker-compose.override.yml ├── docker-compose.yml └── launchSettings.json ├── Caching ├── Caching.sln ├── OvOv.CsRedis.Console │ ├── OvOv.CsRedis.ConsoleDemo.csproj │ └── Program.cs ├── OvOv.CsRedis │ ├── Controllers │ │ └── ValuesController.cs │ ├── Domain │ │ └── UserInfo.cs │ ├── OvOv.CsRedis.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json └── OvOv.StackExchange.Redis │ ├── Controllers │ └── ValuesController.cs │ ├── OvOv.StackExchange.Redis.csproj │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── ChromiumWebBrowser ├── ChromiumWebBrowser.sln ├── ChromiumWebBrowser │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── ChromiumWebBrowser-WpfApp1.csproj │ ├── ChromiumWebBrowser-WpfApp1.sln │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── Readme.md └── Readme.md ├── Console └── CommandLineExamples │ ├── CommandLineExamples.sln │ ├── CommandLineExamples │ ├── CommandLineExamples.csproj │ ├── ExampleCommand.cs │ └── Program.cs │ ├── DragonFruitExamples │ ├── DragonFruitExamples.csproj │ └── Program.cs │ └── MyApp │ ├── MyApp.csproj │ └── Program.cs ├── Database-Drivers ├── Database-Drivers.sln ├── OvOv.DataBase │ ├── Areas │ │ └── Plat │ │ │ └── Controllers │ │ │ └── ValuesController.cs │ ├── Controllers │ │ ├── PostController.cs │ │ └── PostDapperController.cs │ ├── Db │ │ └── AppDb.cs │ ├── Model │ │ ├── Post.cs │ │ └── PostQuery.cs │ ├── OvOv.Db.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── appsettings.Development.json │ └── appsettings.json ├── OvOv.Db.Test │ ├── OvOv.Db.Test.csproj │ ├── UnitTest1.cs │ └── ValuesControllerTest.cs ├── OvOv.FreeSqlMicrosoftSqliteCore │ ├── OvOv.FreeSqlMicrosoftSqliteCore.csproj │ ├── Program.cs │ ├── README.md │ └── g.cs ├── OvOv.SqliteMicrosoft │ ├── OvOv.SqliteMicrosoft.csproj │ └── Program.cs ├── OvOv.SqliteMicrosoftCore │ ├── OvOv.SqliteMicrosoftCore.csproj │ └── Program.cs └── OvOv.SqliteSystemCore │ ├── OvOv.SqliteSystemCore.csproj │ └── Program.cs ├── Frameworks ├── Nacos │ ├── .gitattributes │ ├── .gitignore │ ├── NacosApi │ │ ├── Controllers │ │ │ ├── ConfigController.cs │ │ │ └── UserInfo.cs │ │ ├── NacosApi.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── NacosConsole │ │ ├── App.cs │ │ ├── DemoConfigListener.cs │ │ ├── NacosConsole.csproj │ │ ├── Program.cs │ │ └── appsettings.json │ ├── README.md │ └── nacos-csharp-demo.sln ├── aspnetcore_basic.sln └── aspnetcore_basic │ ├── BasicAuthenticationMiddleware.cs │ ├── Controllers │ └── WeatherForecastController.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ └── aspnetcore_basic.csproj ├── IOC ├── IOC.sln ├── OvOv.ActionFilterDemo │ ├── Controllers │ │ └── WeatherForecastController.cs │ ├── LogActionFilter.cs │ ├── LoggerAttribute.cs │ ├── OvOv.ActionFilterDemo.csproj │ ├── OvOv.ActionFilterDemo.sln │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ └── appsettings.json └── OvOv.AutoFac │ ├── Cat.cs │ ├── CatInterceptor.cs │ ├── CatOwner.cs │ ├── CatProxy.cs │ ├── ICat.cs │ ├── OvOv.AutoFac.csproj │ └── Program.cs ├── LICENSE ├── Logging ├── OvOv.Log.sln ├── OvOv.NLog.Web │ ├── Controllers │ │ └── WeatherForecastController.cs │ ├── Filter │ │ └── NlogActionFilter.cs │ ├── OvOv.Nlog.Web.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── OvOv.Serilog.ConsoleDemo │ ├── App.config │ ├── OvOv.Serilog.ConsoleDemo.csproj │ ├── Program.cs │ └── appsettings.json ├── OvOv.Serilog.MsSql │ ├── OvOv.Serilog.MsSql.csproj │ ├── Program.cs │ └── appsettings.json └── OvOv.Serilog.Web │ ├── Controllers │ ├── HomeController.cs │ └── WeatherForecastController.cs │ ├── Filter │ ├── MvcGlobalExceptionFilter.cs │ └── SerilogActionFilter.cs │ ├── OvOv.Serilog.Web.csproj │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── ORM ├── FreeSql │ ├── OvOv.Core │ │ ├── AutoMapper │ │ │ └── BlogProfile.cs │ │ ├── Domain │ │ │ ├── Blog.cs │ │ │ ├── Classify.cs │ │ │ ├── ISoftDelete.cs │ │ │ ├── Tag.cs │ │ │ └── User.cs │ │ ├── Extensions │ │ │ └── CollectionsExtensions.cs │ │ ├── Models │ │ │ ├── Blogs │ │ │ │ ├── CreateBlogDto.cs │ │ │ │ └── UpdateBlogDto.cs │ │ │ └── Users │ │ │ │ └── CreateUserDto.cs │ │ ├── OvOv.Core.csproj │ │ └── Web │ │ │ ├── PageDto.cs │ │ │ └── PagedResultDto.cs │ ├── OvOv.FreeSql.AutoFac.DynamicProxy │ │ ├── AutofacModule.cs │ │ ├── Controllers │ │ │ ├── BlogController.cs │ │ │ └── TagController.cs │ │ ├── Extensions.cs │ │ ├── OvOv.FreeSql.AutoFac.DynamicProxy.csproj │ │ ├── OvOvDbContext.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Repositories │ │ │ ├── BlogRepository.cs │ │ │ ├── IBlogRepository.cs │ │ │ ├── ITagRepository.cs │ │ │ └── TagRepository.cs │ │ ├── Services │ │ │ ├── BlogService.cs │ │ │ ├── T1Service.cs │ │ │ ├── TagService.cs │ │ │ └── TransBlogService.cs │ │ ├── Startup.cs │ │ ├── TransactionalAttribute.cs │ │ ├── UnitOfWorkInterceptor.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── OvOv.FreeSql.IdleBus │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── IDeleted.cs │ │ ├── MultiFreeSql.cs │ │ ├── OvOv.FreeSql.IdleBus.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── OvOv.FreeSql.Repository │ │ ├── Controllers │ │ │ ├── BlogController.cs │ │ │ └── TagController.cs │ │ ├── OvOv.FreeSql.Repository.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Repositories │ │ │ ├── BlogRepository.cs │ │ │ ├── IBlogRepository.cs │ │ │ ├── ITagRepository.cs │ │ │ └── TagRepository.cs │ │ ├── Services │ │ │ ├── BlogService.cs │ │ │ └── TagService.cs │ │ ├── Startup.cs │ │ ├── TransactionalAttribute.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── OvOv.FreeSql.sln │ ├── OvOv.FreeSql.xUnit │ │ ├── OvOv.FreeSql.xUnit.csproj │ │ └── UnitTest1.cs │ ├── OvOv.FreeSql │ │ ├── Controllers │ │ │ ├── BlogController.cs │ │ │ ├── DepController.cs │ │ │ └── UserController.cs │ │ ├── DepInfo.cs │ │ ├── FreeSqlExtensions.cs │ │ ├── OvOv.FreeSql.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── OvOv.Razor │ │ ├── CopyRightTemplate.cshtml │ │ ├── CopyRightUserInfo.cs │ │ ├── HelloWorld.cshtml │ │ ├── OvOv.Razor.csproj │ │ ├── Program.cs │ │ └── RazorTemplateBase.cs │ └── OvOv.WindowsFormsApp │ │ ├── ConfigInfo.cs │ │ ├── DB.cs │ │ ├── Form1.Designer.cs │ │ ├── Form1.cs │ │ ├── Form1.resx │ │ ├── OvOv.WindowsFormsApp.csproj │ │ ├── Program.cs │ │ └── WinFromContext.cs └── InSql │ ├── InSqlDemo.sln │ └── InSqlDemo │ ├── Controllers │ └── AuthController.cs │ ├── InSqlDemo.csproj │ ├── Models │ ├── AuthDbContext.cs │ ├── AuthDbContext.insql.xml │ ├── RoleInfo.cs │ └── UserInfo.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ └── insql.tests.db ├── README.md ├── Roadmap.md ├── Web-Socket ├── OvOv.ImCore.Chat │ ├── Controllers │ │ └── WebSocketController.cs │ ├── Dockerfile │ ├── OvOv.ImCore.Chat.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ │ └── index.html ├── OvOv.ImCore.Server │ ├── Dockerfile │ ├── OvOv.ImCore.Server.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── README.md ├── Signlar │ ├── SignlarDemo.sln │ └── SignlarDemo │ │ ├── Controllers │ │ ├── Api │ │ │ └── UserController.cs │ │ └── HomeController.cs │ │ ├── Hubs │ │ └── MessageHub.cs │ │ ├── Models │ │ └── ErrorViewModel.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── SignlarDemo.csproj │ │ ├── Startup.cs │ │ ├── Views │ │ ├── Home │ │ │ ├── Index.cshtml │ │ │ ├── Login.cshtml │ │ │ └── Privacy.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ ├── _Layout.cshtml │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ ├── css │ │ └── site.css │ │ ├── favicon.ico │ │ └── js │ │ └── chat.js └── Web-Socket.sln ├── blazor ├── BlazorAppPWA │ ├── App.razor │ ├── BlazorAppPWA.csproj │ ├── GalaxyInfo.cs │ ├── Pages │ │ ├── Counter.razor │ │ ├── FetchData.razor │ │ ├── Index.razor │ │ └── payment.cs │ ├── Program.cs │ ├── Properties │ │ ├── PublishProfiles │ │ │ └── FolderProfile.pubxml │ │ └── launchSettings.json │ ├── ResSeller.cs │ ├── Shared │ │ ├── MainLayout.razor │ │ ├── NavMenu.razor │ │ └── SurveyPrompt.razor │ ├── Tools.cs │ ├── _Imports.razor │ ├── appsettings.json │ ├── dataP.cs │ └── wwwroot │ │ ├── css │ │ ├── app.css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ └── open-iconic │ │ │ ├── FONT-LICENSE │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ │ ├── favicon.ico │ │ ├── icon-512.png │ │ ├── index.html │ │ ├── manifest.json │ │ ├── sample-data │ │ └── weather.json │ │ ├── service-worker.js │ │ └── service-worker.published.js ├── BlazorAppTodoList │ ├── .vscode │ │ └── launch.json │ ├── App.razor │ ├── Pages │ │ └── Index.razor │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Shared │ │ └── MainLayout.razor │ ├── TodoList.csproj │ ├── TodoList.sln │ ├── _Imports.razor │ └── wwwroot │ │ ├── css │ │ ├── icon.css │ │ ├── icon.woff2 │ │ └── style.css │ │ ├── favicon.ico │ │ └── index.html ├── BlazorAppUpgrader │ ├── BlazorAppUpgrader.sln │ ├── BlazorAppUpgrader │ │ ├── App.razor │ │ ├── BlazorAppUpgrader.csproj │ │ ├── Controllers │ │ │ ├── RestartApp.cs │ │ │ └── RestartAppModel.cs │ │ ├── CustomModules │ │ │ └── CustomClassLibrary.dll │ │ ├── Pages │ │ │ └── _Host.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── Upgrade │ │ │ ├── CustomClassLibrary.dll │ │ │ └── Placeholder.txt │ │ ├── Uploads │ │ │ ├── Placeholder.txt │ │ │ ├── UpgradePackageVersionOne.zip │ │ │ └── UpgradePackageVersionTwo.zip │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ └── favicon.ico │ ├── CustomClassLibrary │ │ ├── CustomClassLibrary.csproj │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── Index.razor │ │ │ ├── UploadFile.razor │ │ │ └── _Imports.razor │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ ├── NavMenu.razor │ │ │ └── RestartAppModel.cs │ │ └── _Imports.razor │ ├── UpgradePackageVersionOne.zip │ └── UpgradePackageVersionTwo.zip ├── BlazorClientSolo │ ├── App.razor │ ├── BlazorApp1.csproj │ ├── Class1.cs │ ├── Pages │ │ ├── Counter.razor │ │ ├── FetchData.razor │ │ └── Index.razor │ ├── Program.cs │ ├── Properties │ │ ├── PublishProfiles │ │ │ └── FolderProfile.pubxml │ │ └── launchSettings.json │ ├── Shared │ │ ├── MainLayout.razor │ │ ├── NavMenu.razor │ │ └── SurveyPrompt.razor │ ├── _Imports.razor │ └── wwwroot │ │ ├── css │ │ ├── app.css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ └── open-iconic │ │ │ ├── FONT-LICENSE │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ │ ├── favicon.ico │ │ ├── icon-512.png │ │ ├── index.html │ │ ├── manifest.json │ │ ├── sample-data │ │ └── weather.json │ │ ├── service-worker.js │ │ └── service-worker.published.js ├── BlazorCookieAuth │ ├── BlazorCookieAuth.sln │ └── BlazorCookieAuth │ │ ├── App.razor │ │ ├── BlazorCookieAuth.csproj │ │ ├── Controllers │ │ └── UserController.cs │ │ ├── Data │ │ ├── ApplicationDbContext.cs │ │ ├── Migrations │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── TestContext.cs │ │ ├── WeatherForecast.cs │ │ └── WeatherForecastService.cs │ │ ├── Pages │ │ ├── CallServerSide.razor │ │ ├── Counter.razor │ │ ├── Error.razor │ │ ├── FetchData.razor │ │ ├── Index.razor │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ ├── LoginGoogle.cshtml │ │ ├── LoginGoogle.cshtml.cs │ │ ├── Logout.cshtml │ │ ├── Logout.cshtml.cs │ │ └── _Host.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Shared │ │ ├── LoginControl.razor │ │ ├── LoginControlGoogle.razor │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ │ ├── Startup.cs │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ ├── css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── open-iconic │ │ │ ├── FONT-LICENSE │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── font │ │ │ │ ├── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.svg │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ └── site.css │ │ └── favicon.ico ├── BlazorGmail │ ├── BlazorGmail.sln │ └── BlazorGmail │ │ ├── App.razor │ │ ├── BlazorGmail.csproj │ │ ├── Pages │ │ ├── Counter.razor │ │ ├── FetchData.razor │ │ ├── Index.razor │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ ├── Logout.cshtml │ │ ├── Logout.cshtml.cs │ │ └── _Host.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Services │ │ ├── WeatherForecast.cs │ │ └── WeatherForecastService.cs │ │ ├── Shared │ │ ├── LoginControl.razor │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ │ ├── Startup.cs │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ ├── css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── open-iconic │ │ │ ├── FONT-LICENSE │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── font │ │ │ │ ├── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.svg │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ └── site.css │ │ └── favicon.ico ├── BlazorServer │ ├── App.razor │ ├── BlazorServer.csproj │ ├── Data │ │ ├── WeatherForecast.cs │ │ └── WeatherForecastService.cs │ ├── Pages │ │ ├── Counter.razor │ │ ├── Error.razor │ │ ├── FetchData.razor │ │ ├── Index.razor │ │ └── _Host.cshtml │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Shared │ │ ├── MainLayout.razor │ │ └── NavMenu.razor │ ├── Startup.cs │ ├── _Imports.razor │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ │ ├── css │ │ ├── bootstrap │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── open-iconic │ │ │ ├── FONT-LICENSE │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── font │ │ │ │ ├── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.svg │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ └── site.css │ │ └── favicon.ico └── BlazorStateManagement │ ├── BlazorStateManagement.sln │ └── BlazorStateManagement │ ├── App.razor │ ├── BlazorStateManagement.csproj │ ├── Data │ ├── WeatherForecast.cs │ └── WeatherForecastService.cs │ ├── Pages │ ├── Counter.razor │ ├── Error.razor │ ├── FetchData.razor │ ├── Index.razor │ └── _Host.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── SessionState │ └── CounterState.cs │ ├── Shared │ ├── MainLayout.razor │ └── NavMenu.razor │ ├── Startup.cs │ ├── _Imports.razor │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ ├── css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ └── site.css │ └── favicon.ico └── dotnetcore-examples.sln /999-Others/NET6/NET6Extensions/NET6Extensions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /999-Others/NET6/NET6Extensions/Program.cs: -------------------------------------------------------------------------------- 1 | WebApplication.CreateBuilder(args) 2 | .RegisterServices() 3 | .Build() 4 | .SetupMiddleware() 5 | .Run(); 6 | -------------------------------------------------------------------------------- /999-Others/NET6/NET6Extensions/RegisterStartupMiddlewares.cs: -------------------------------------------------------------------------------- 1 | public static class RegisterStartupMiddlewares 2 | { 3 | public static WebApplication SetupMiddleware(this WebApplication app) 4 | { 5 | if (app.Environment.IsDevelopment()) 6 | { 7 | app.UseSwagger(); 8 | app.UseSwaggerUI(); 9 | } 10 | 11 | app.UseHttpsRedirection(); 12 | 13 | app.UseAuthorization(); 14 | 15 | app.MapControllers(); 16 | return app; 17 | } 18 | } -------------------------------------------------------------------------------- /999-Others/NET6/NET6Extensions/RegisterStartupServices.cs: -------------------------------------------------------------------------------- 1 | public static class RegisterStartupServices 2 | { 3 | public static WebApplicationBuilder RegisterServices(this WebApplicationBuilder builder) 4 | { 5 | builder.Services.AddControllers(); 6 | builder.Services.AddEndpointsApiExplorer(); 7 | builder.Services.AddSwaggerGen(); 8 | 9 | return builder; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /999-Others/NET6/NET6Extensions/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace NET6Extensions 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /999-Others/NET6/NET6Extensions/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /999-Others/NET6/NET6Extensions/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /999-Others/NET6/NET6Startup/NET6Startup.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /999-Others/NET6/NET6Startup/Program.cs: -------------------------------------------------------------------------------- 1 | using NET6Startup; 2 | 3 | var builder = WebApplication.CreateBuilder(args); 4 | 5 | var startup = new Startup(builder.Configuration); 6 | startup.ConfigureServices(builder.Services); 7 | 8 | 9 | var app = builder.Build(); 10 | 11 | startup.Configure(app, builder.Environment); -------------------------------------------------------------------------------- /999-Others/NET6/NET6Startup/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace NET6Startup 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /999-Others/NET6/NET6Startup/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /999-Others/NET6/NET6Startup/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /999-Others/OvOv.StopWords/OvOv.StopWords.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net7.0 5 | StopWords 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /999-Others/OvOv.StopWords/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | 4 | namespace StopWords 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IHostBuilder CreateHostBuilder(string[] args) => 14 | Host.CreateDefaultBuilder(args) 15 | .ConfigureWebHostDefaults(webBuilder => 16 | { 17 | webBuilder.UseStartup(); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /999-Others/OvOv.StopWords/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:5636", 8 | "sslPort": 44388 9 | } 10 | }, 11 | "profiles": { 12 | "ToolGood.Words": { 13 | "commandName": "Project", 14 | "launchBrowser": true, 15 | "launchUrl": "api/word?text=fuck", 16 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /999-Others/OvOv.StopWords/_Illegal/IllegalBit.iws: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/999-Others/OvOv.StopWords/_Illegal/IllegalBit.iws -------------------------------------------------------------------------------- /999-Others/OvOv.StopWords/_Illegal/IllegalInfo.txt: -------------------------------------------------------------------------------- 1 | 2019-12-23 00:57:36|2019-12-23 00:57:36 -------------------------------------------------------------------------------- /999-Others/OvOv.StopWords/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /999-Others/OvOv.StopWords/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /999-Others/Qiniu/OvOv.MQiniu.Core/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base 2 | COPY . /app 3 | WORKDIR /app 4 | EXPOSE 80 5 | ENTRYPOINT ["dotnet", "Qiniu.Web.dll"] 6 | 7 | -------------------------------------------------------------------------------- /999-Others/Qiniu/OvOv.MQiniu.Core/Models/ResultDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Qiniu.Web.Models 7 | { 8 | public class ResultDto 9 | { 10 | public ResultDto(int code,string msg, object data) 11 | { 12 | Code = code; 13 | Data = data; 14 | Msg = msg; 15 | } 16 | 17 | public ResultDto(int code, string msg) 18 | { 19 | Code = code; 20 | Msg = msg; 21 | } 22 | 23 | public int Code { get; set; } 24 | public object Data { get; set; } 25 | public string Msg { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /999-Others/Qiniu/OvOv.MQiniu.Core/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:62974", 7 | "sslPort": 44321 8 | } 9 | }, 10 | "$schema": "http://json.schemastore.org/launchsettings.json", 11 | "profiles": { 12 | "Qiniu.Web": { 13 | "commandName": "Project", 14 | "launchBrowser": true, 15 | "launchUrl": "swagger/index.html", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | }, 19 | "applicationUrl": "https://localhost:5001/;http://localhost:5000" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /999-Others/Qiniu/OvOv.MQiniu.Core/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /999-Others/Qiniu/OvOv.MQiniu.Core/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Qiniu": { 9 | "AK": "eUH1O-ft66S4XM2GIK7FGmj7czuYkcAyNGDAc-wq", 10 | "SK": "4dOi1daSr2-YgofhAfWb8JaLrbgozCmgD6AUmmM9", 11 | "Bucket": "vant-ui", 12 | "PrefixPath": "ui", 13 | "Host": "http://pu5vnz60k.bkt.clouddn.com/" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /999-Others/Qiniu/OvOv.MQiniu.Core/publish.bat: -------------------------------------------------------------------------------- 1 | 2 | @echo off 3 | 4 | dotnet clean 5 | dotnet restore 6 | dotnet build 7 | 8 | DEL /F/Q/S "D:\Publishes\Qiniu" > NUL && RMDIR /Q/S "D:\Publishes\Qiniu" 9 | 10 | ::dotnet publish -c Release -r win-x64 --self-contained true -o "D:\Publishes\Qiniu\win-x64" 11 | ::dotnet publish -c Release -r win-x86 --self-contained true -o "D:\Publishes\Qiniu\win-x86" 12 | ::dotnet publish -c Release -r osx-x64 --self-contained true -o "D:\Publishes\Qiniu\osx-x64" 13 | dotnet publish -c Release -r linux-x64 --self-contained false -o "D:\Publishes\Qiniu\linux-x64" -------------------------------------------------------------------------------- /999-Others/Qiniu/QiniuDownload/QiniuDownload.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net7.0 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /999-Others/README.md: -------------------------------------------------------------------------------- 1 | ### [MQiniu.Core七牛云对象存储](https://github.com/Hello-Mango/MQiniu.Core) 2 | - [ASP.NET Core 集成七牛云对象存储](https://igeekfan.cn/dotnetcore/examples/qiniu-object-storage.html) 3 | 4 | ### [一款高性能非法词(敏感词)检测组件](https://github.com/toolgood/ToolGood.Words) 5 | - [全局敏感词处理](https://igeekfan.cn/dotnetcore/lin-cms/stopwords.html) -------------------------------------------------------------------------------- /999-Others/console-hello-world/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace console_hello_world 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | if (args.Length > 0) 10 | { 11 | Console.WriteLine($"Hello {args[0]}!"); 12 | } 13 | else 14 | { 15 | Console.WriteLine("Hello World!"); 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /999-Others/console-hello-world/console-hello-world.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net7.0 6 | console_hello_world 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /999-Others/console-news-types/src/NewTypes/NewTypes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net7.0 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /999-Others/console-news-types/src/NewTypes/Pets/Cat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Pets 4 | { 5 | public class Cat : IPet 6 | { 7 | public string TalkToOwner() => "Meow!"; 8 | } 9 | } -------------------------------------------------------------------------------- /999-Others/console-news-types/src/NewTypes/Pets/Dog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Pets 4 | { 5 | public class Dog : IPet 6 | { 7 | public string TalkToOwner() => "Woof!"; 8 | } 9 | } -------------------------------------------------------------------------------- /999-Others/console-news-types/src/NewTypes/Pets/IPet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Pets 4 | { 5 | public interface IPet 6 | { 7 | string TalkToOwner(); 8 | } 9 | } -------------------------------------------------------------------------------- /999-Others/console-news-types/src/NewTypes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Pets; 3 | using System.Collections.Generic; 4 | 5 | namespace NewTypes 6 | { 7 | class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | var pets = new List 12 | { 13 | new Dog(), 14 | new Cat() 15 | }; 16 | 17 | foreach (var pet in pets) 18 | { 19 | Console.WriteLine(pet.TalkToOwner()); 20 | } 21 | 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /999-Others/console-news-types/test/NewTypesTests/PetTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | using Pets; 4 | 5 | public class PetTests 6 | { 7 | [Fact] 8 | public void DogTalkToOwnerReturnsWoof() 9 | { 10 | string expected = "Woof!"; 11 | string actual = new Dog().TalkToOwner(); 12 | 13 | Assert.Equal(expected, actual); 14 | } 15 | 16 | [Fact] 17 | public void CatTalkToOwnerReturnsMeow() 18 | { 19 | string expected = "Meow!"; 20 | string actual = new Cat().TalkToOwner(); 21 | 22 | Assert.Equal(expected, actual); 23 | } 24 | 25 | [Fact] 26 | public void TestTyepof() 27 | { 28 | 29 | Type typeofDog = typeof(Dog); 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /API/WebApiClient/README.md: -------------------------------------------------------------------------------- 1 | #### [WebApiClient](https://github.com/dotnetcore/WebApiClient) 2 | 3 | HTTPAPI、base on httpclient、使用简单 -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/Controllers/ValuesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.Http; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using WebApiClient; 8 | 9 | namespace WeChat.Mp.Controllers 10 | { 11 | [Route("api/[controller]")] 12 | [ApiController] 13 | public class ValuesController : ControllerBase 14 | { 15 | // GET api/values 16 | [HttpGet] 17 | public async Task> GetAsync(string jscode="") 18 | { 19 | var api = HttpApi.Create(); 20 | var response = await api.Jscode2Session("", "", jscode); 21 | return response; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | EXPOSE 443 5 | 6 | FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build 7 | WORKDIR /src 8 | COPY ["WeChat.Mp/WeChat.Mp.csproj", "WeChat.Mp/"] 9 | RUN dotnet restore "WeChat.Mp/WeChat.Mp.csproj" 10 | COPY . . 11 | WORKDIR "/src/WeChat.Mp" 12 | RUN dotnet build "WeChat.Mp.csproj" -c Release -o /app 13 | 14 | FROM build AS publish 15 | RUN dotnet publish "WeChat.Mp.csproj" -c Release -o /app 16 | 17 | FROM base AS final 18 | WORKDIR /app 19 | COPY --from=publish /app . 20 | ENTRYPOINT ["dotnet", "WeChat.Mp.dll"] -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/IMyWebApi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.Http; 5 | using System.Threading.Tasks; 6 | using WebApiClient; 7 | using WebApiClient.Attributes; 8 | 9 | namespace WeChat.Mp 10 | { 11 | public interface IMyWebApi : IHttpApi 12 | { 13 | [HttpGet("https://api.weixin.qq.com/sns/jscode2session")] 14 | [JsonReturn] 15 | ITask Jscode2Session(string appid,string secret,string js_code,string grant_type= "authorization_code"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/OvOv.WeChat.Mp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | InProcess 6 | 93aecbf2-fa14-4ea0-99fe-7decb9403830 7 | Linux 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace WeChat.Mp 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/ResultMsg.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace WeChat.Mp 7 | { 8 | public class ResultMsg 9 | { 10 | public string openid { get; set; } 11 | public string session_key { get; set; } 12 | public string unionid { get; set; } 13 | public int errcode { get; set; } 14 | public string errmsg { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /API/WebApiClient/WeChat.Mp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /Application-Frameworks/CAP/OvOv.CAP/Controllers/CapController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DotNetCore.CAP; 3 | using Microsoft.AspNetCore.Mvc; 4 | 5 | namespace OvOv.CAP.Controllers 6 | { 7 | [ApiController] 8 | [Route("[controller]")] 9 | public class CapController : ControllerBase 10 | { 11 | [HttpGet("send")] 12 | public IActionResult SendMessage([FromServices] ICapPublisher capBus) 13 | { 14 | capBus.Publish("test.show.time", DateTime.Now); 15 | 16 | return Ok(); 17 | } 18 | 19 | [NonAction] 20 | [CapSubscribe("test.show.time")] 21 | public void ReceiveMessage(DateTime time) 22 | { 23 | Console.WriteLine("message time is:" + time); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Application-Frameworks/CAP/OvOv.CAP/OvOv.CAP.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Application-Frameworks/CAP/OvOv.CAP/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "OvOv.CAP": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "launchUrl": "Cap/Send", 7 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 8 | "environmentVariables": { 9 | "ASPNETCORE_ENVIRONMENT": "Development" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Application-Frameworks/CAP/OvOv.CAP/Startup.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Application-Frameworks/CAP/OvOv.CAP/Startup.cs -------------------------------------------------------------------------------- /Application-Frameworks/CAP/OvOv.CAP/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Application-Frameworks/CAP/OvOv.CAP/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /Authentication-and-Authorization/ApiService/ApiService.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ApiService 5 | 6 | 7 | 8 | 9 | 这是注释 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/ApiService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ApiService": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "http://localhost:5000" 10 | }, 11 | "Docker": { 12 | "commandName": "Docker", 13 | "launchBrowser": true, 14 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", 15 | "publishAllPorts": true 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/ApiService/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/ApiService/appsettings.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "Service": { 4 | "Name": "clientservice", 5 | "Port": "5010", 6 | "DocName": "clientservice", 7 | "Version": "v1", 8 | "Title": "CAS Client Service API", 9 | "Description": "CAS Client Service API provide some API to help you get client information from CAS", 10 | "Contact": { 11 | "Name": "CAS 2.0 Team", 12 | "Email": "EdisonZhou@manulife.com" 13 | }, 14 | "XmlFile": "Manulife.DNC.MSAD.IdentityServer4Test.ApiService01.xml" 15 | }, 16 | "Identity": { 17 | "IP": "localhost", 18 | "Port": "5001", 19 | "Scheme": "Bearer" 20 | } 21 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace IdentityServer4.Service 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateWebHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "IdentityServer4": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "http://localhost:5001" 10 | }, 11 | "Docker": { 12 | "commandName": "Docker", 13 | "launchBrowser": true, 14 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", 15 | "publishAllPorts": true 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Account/ExternalProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServer4.Quickstart.UI 6 | { 7 | public class ExternalProvider 8 | { 9 | public string DisplayName { get; set; } 10 | public string AuthenticationScheme { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Account/LoginInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | namespace IdentityServer4.Quickstart.UI 8 | { 9 | public class LoginInputModel 10 | { 11 | [Required] 12 | public string Username { get; set; } 13 | [Required] 14 | public string Password { get; set; } 15 | public bool RememberLogin { get; set; } 16 | public string ReturnUrl { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Account/LogoutInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServer4.Quickstart.UI 6 | { 7 | public class LogoutInputModel 8 | { 9 | public string LogoutId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Account/LogoutViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServer4.Quickstart.UI 6 | { 7 | public class LogoutViewModel : LogoutInputModel 8 | { 9 | public bool ShowLogoutPrompt { get; set; } = true; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Account/RedirectViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | 6 | namespace IdentityServer4.Quickstart.UI 7 | { 8 | public class RedirectViewModel 9 | { 10 | public string RedirectUrl { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Consent/ConsentInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System.Collections.Generic; 6 | 7 | namespace IdentityServer4.Quickstart.UI 8 | { 9 | public class ConsentInputModel 10 | { 11 | public string Button { get; set; } 12 | public IEnumerable ScopesConsented { get; set; } 13 | public bool RememberConsent { get; set; } 14 | public string ReturnUrl { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Consent/ScopeViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServer4.Quickstart.UI 6 | { 7 | public class ScopeViewModel 8 | { 9 | public string Name { get; set; } 10 | public string DisplayName { get; set; } 11 | public string Description { get; set; } 12 | public bool Emphasize { get; set; } 13 | public bool Required { get; set; } 14 | public bool Checked { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Device/DeviceAuthorizationInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServer4.Quickstart.UI.Device 6 | { 7 | public class DeviceAuthorizationInputModel : ConsentInputModel 8 | { 9 | public string UserCode { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Device/DeviceAuthorizationViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServer4.Quickstart.UI.Device 6 | { 7 | public class DeviceAuthorizationViewModel : ConsentViewModel 8 | { 9 | public string UserCode { get; set; } 10 | public bool ConfirmUserCode { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Quickstart/Home/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using IdentityServer4.Models; 6 | 7 | namespace IdentityServer4.Quickstart.UI 8 | { 9 | public class ErrorViewModel 10 | { 11 | public ErrorViewModel() 12 | { 13 | } 14 | 15 | public ErrorViewModel(string error) 16 | { 17 | Error = new ErrorMessage { Error = error }; 18 | } 19 | 20 | public ErrorMessage Error { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/Account/AccessDenied.cshtml: -------------------------------------------------------------------------------- 1 |  2 |
3 | 6 | 7 |

You do not have access to that resource.

8 |
-------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/Account/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @model LogoutViewModel 2 | 3 |
4 | 7 | 8 |
9 |
10 |

Would you like to logout of IdentityServer?

11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 |
19 |
20 |
21 |
-------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/Device/Success.cshtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/Device/UserCodeCapture.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/Diagnostics/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model DiagnosticsViewModel 2 | 3 |

Authentication cookie

4 | 5 |

Claims

6 |
7 | @foreach (var claim in Model.AuthenticateResult.Principal.Claims) 8 | { 9 |
@claim.Type
10 |
@claim.Value
11 | } 12 |
13 | 14 |

Properties

15 |
16 | @foreach (var prop in Model.AuthenticateResult.Properties.Items) 17 | { 18 |
@prop.Key
19 |
@prop.Value
20 | } 21 |
22 | 23 | @if (Model.Clients.Any()) 24 | { 25 |

Clients

26 |
    27 | @foreach (var client in Model.Clients) 28 | { 29 |
  • @client
  • 30 | } 31 |
32 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/Shared/Redirect.cshtml: -------------------------------------------------------------------------------- 1 | @model RedirectViewModel 2 | 3 |

You are now being returned to the application.

4 |

Once complete, you may close this tab

5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |
4 | Error 5 |
6 |
7 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServer4.Quickstart.UI 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Certificates": { 3 | "CerPath": "certificate\\cas.clientservice.pfx", 4 | "Password": "manulife" 5 | }, 6 | "Clients": { 7 | "MvcClient": { 8 | "IP": "localhost", 9 | "Port": 5100 10 | } 11 | }, 12 | "WithOrigins": [ "http://localhost:5000", "http://localhost:8080" ] 13 | } 14 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/IdentityServer4/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/IdentityServer4/wwwroot/icon.jpg -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/IdentityServer4/wwwroot/icon.png -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/js/signin-redirect.js: -------------------------------------------------------------------------------- 1 | window.location.href = document.querySelector("meta[http-equiv=refresh]").getAttribute("data-url"); 2 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/js/signout-redirect.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("load", function () { 2 | var a = document.querySelector("a.PostLogoutRedirectUri"); 3 | if (a) { 4 | window.location = a.href; 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | padding: $jumbotron-padding ($jumbotron-padding / 2); 3 | margin-bottom: $jumbotron-padding; 4 | color: $jumbotron-color; 5 | background-color: $jumbotron-bg; 6 | @include border-radius($border-radius-lg); 7 | 8 | @include media-breakpoint-up(sm) { 9 | padding: ($jumbotron-padding * 2) $jumbotron-padding; 10 | } 11 | } 12 | 13 | .jumbotron-fluid { 14 | padding-right: 0; 15 | padding-left: 0; 16 | @include border-radius(0); 17 | } 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/_media.scss: -------------------------------------------------------------------------------- 1 | .media { 2 | display: flex; 3 | align-items: flex-start; 4 | } 5 | 6 | .media-body { 7 | flex: 1; 8 | } 9 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/_transitions.scss: -------------------------------------------------------------------------------- 1 | .fade { 2 | @include transition($transition-fade); 3 | 4 | &:not(.show) { 5 | opacity: 0; 6 | } 7 | } 8 | 9 | .collapse { 10 | &:not(.show) { 11 | display: none; 12 | } 13 | } 14 | 15 | .collapsing { 16 | position: relative; 17 | height: 0; 18 | overflow: hidden; 19 | @include transition($transition-collapse); 20 | } 21 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/align"; 2 | @import "utilities/background"; 3 | @import "utilities/borders"; 4 | @import "utilities/clearfix"; 5 | @import "utilities/display"; 6 | @import "utilities/embed"; 7 | @import "utilities/flex"; 8 | @import "utilities/float"; 9 | @import "utilities/overflow"; 10 | @import "utilities/position"; 11 | @import "utilities/screenreaders"; 12 | @import "utilities/shadows"; 13 | @import "utilities/sizing"; 14 | @import "utilities/stretched-link"; 15 | @import "utilities/spacing"; 16 | @import "utilities/text"; 17 | @import "utilities/visibility"; 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/bootstrap-grid.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grid v4.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | html { 9 | box-sizing: border-box; 10 | -ms-overflow-style: scrollbar; 11 | } 12 | 13 | *, 14 | *::before, 15 | *::after { 16 | box-sizing: inherit; 17 | } 18 | 19 | @import "functions"; 20 | @import "variables"; 21 | 22 | @import "mixins/breakpoints"; 23 | @import "mixins/grid-framework"; 24 | @import "mixins/grid"; 25 | 26 | @import "grid"; 27 | @import "utilities/display"; 28 | @import "utilities/flex"; 29 | @import "utilities/spacing"; 30 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/bootstrap-reboot.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | 9 | @import "functions"; 10 | @import "variables"; 11 | @import "mixins"; 12 | @import "reboot"; 13 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_alert.scss: -------------------------------------------------------------------------------- 1 | @mixin alert-variant($background, $border, $color) { 2 | color: $color; 3 | @include gradient-bg($background); 4 | border-color: $border; 5 | 6 | hr { 7 | border-top-color: darken($border, 5%); 8 | } 9 | 10 | .alert-link { 11 | color: darken($color, 10%); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Contextual backgrounds 4 | 5 | @mixin bg-variant($parent, $color, $ignore-warning: false) { 6 | #{$parent} { 7 | background-color: $color !important; 8 | } 9 | a#{$parent}, 10 | button#{$parent} { 11 | @include hover-focus() { 12 | background-color: darken($color, 10%) !important; 13 | } 14 | } 15 | @include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning); 16 | } 17 | 18 | @mixin bg-gradient-variant($parent, $color) { 19 | #{$parent} { 20 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_badge.scss: -------------------------------------------------------------------------------- 1 | @mixin badge-variant($bg) { 2 | color: color-yiq($bg); 3 | background-color: $bg; 4 | 5 | @at-root a#{&} { 6 | @include hover-focus() { 7 | color: color-yiq($bg); 8 | background-color: darken($bg, 10%); 9 | } 10 | 11 | &:focus, 12 | &.focus { 13 | outline: 0; 14 | box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | @if $enable-shadows { 3 | $result: (); 4 | 5 | @if (length($shadow) == 1) { 6 | // We can pass `@include box-shadow(none);` 7 | $result: $shadow; 8 | } @else { 9 | // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;` 10 | @for $i from 1 through length($shadow) { 11 | @if nth($shadow, $i) != "none" { 12 | $result: append($result, nth($shadow, $i), "comma"); 13 | } 14 | } 15 | } 16 | @if (length($result) > 0) { 17 | box-shadow: $result; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &::after { 3 | display: block; 4 | clear: both; 5 | content: ""; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_deprecate.scss: -------------------------------------------------------------------------------- 1 | // Deprecate mixin 2 | // 3 | // This mixin can be used to deprecate mixins or functions. 4 | // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to 5 | // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap) 6 | @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) { 7 | @if ($enable-deprecation-messages != false and $ignore-warning != true) { 8 | @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}."; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @mixin float-left() { 4 | float: left !important; 5 | @include deprecate("The `float-left` mixin", "v4.3.0", "v5"); 6 | } 7 | @mixin float-right() { 8 | float: right !important; 9 | @include deprecate("The `float-right` mixin", "v4.3.0", "v5"); 10 | } 11 | @mixin float-none() { 12 | float: none !important; 13 | @include deprecate("The `float-none` mixin", "v4.3.0", "v5"); 14 | } 15 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_list-group.scss: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | @mixin list-group-item-variant($state, $background, $color) { 4 | .list-group-item-#{$state} { 5 | color: $color; 6 | background-color: $background; 7 | 8 | &.list-group-item-action { 9 | @include hover-focus() { 10 | color: $color; 11 | background-color: darken($background, 5%); 12 | } 13 | 14 | &.active { 15 | color: $white; 16 | background-color: $color; 17 | border-color: $color; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_lists.scss: -------------------------------------------------------------------------------- 1 | // Lists 2 | 3 | // Unstyled keeps list items block level, just removes default browser padding and list-style 4 | @mixin list-unstyled() { 5 | padding-left: 0; 6 | list-style: none; 7 | } 8 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_nav-divider.scss: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y, $ignore-warning: false) { 6 | height: 0; 7 | margin: $margin-y 0; 8 | overflow: hidden; 9 | border-top: 1px solid $color; 10 | @include deprecate("The `nav-divider()` mixin", "v4.4.0", "v5", $ignore-warning); 11 | } 12 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { 4 | .page-link { 5 | padding: $padding-y $padding-x; 6 | @include font-size($font-size); 7 | line-height: $line-height; 8 | } 9 | 10 | .page-item { 11 | &:first-child { 12 | .page-link { 13 | @include border-left-radius($border-radius); 14 | } 15 | } 16 | &:last-child { 17 | .page-link { 18 | @include border-right-radius($border-radius); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_reset-text.scss: -------------------------------------------------------------------------------- 1 | @mixin reset-text() { 2 | font-family: $font-family-base; 3 | // We deliberately do NOT reset font-size or word-wrap. 4 | font-style: normal; 5 | font-weight: $font-weight-normal; 6 | line-height: $line-height-base; 7 | text-align: left; // Fallback for where `start` is not supported 8 | text-align: start; 9 | text-decoration: none; 10 | text-shadow: none; 11 | text-transform: none; 12 | letter-spacing: normal; 13 | word-break: normal; 14 | word-spacing: normal; 15 | white-space: normal; 16 | line-break: auto; 17 | } 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_resize.scss: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | @mixin resizable($direction) { 4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 5 | resize: $direction; // Options: horizontal, vertical, both 6 | } 7 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_size.scss: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | @mixin size($width, $height: $width) { 4 | width: $width; 5 | height: $height; 6 | @include deprecate("`size()`", "v4.3.0", "v5"); 7 | } 8 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_text-emphasis.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Typography 4 | 5 | @mixin text-emphasis-variant($parent, $color, $ignore-warning: false) { 6 | #{$parent} { 7 | color: $color !important; 8 | } 9 | @if $emphasized-link-hover-darken-percentage != 0 { 10 | a#{$parent} { 11 | @include hover-focus() { 12 | color: darken($color, $emphasized-link-hover-darken-percentage) !important; 13 | } 14 | } 15 | } 16 | @include deprecate("`text-emphasis-variant()`", "v4.4.0", "v5", $ignore-warning); 17 | } 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_text-hide.scss: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | @mixin text-hide($ignore-warning: false) { 3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword 4 | font: 0/0 a; 5 | color: transparent; 6 | text-shadow: none; 7 | background-color: transparent; 8 | border: 0; 9 | 10 | @include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning); 11 | } 12 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_text-truncate.scss: -------------------------------------------------------------------------------- 1 | // Text truncate 2 | // Requires inline-block or block for proper styling 3 | 4 | @mixin text-truncate() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_transition.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable property-blacklist 2 | @mixin transition($transition...) { 3 | @if $enable-transitions { 4 | @if length($transition) == 0 { 5 | transition: $transition-base; 6 | } @else { 7 | transition: $transition; 8 | } 9 | } 10 | 11 | @if $enable-prefers-reduced-motion-media-query { 12 | @media (prefers-reduced-motion: reduce) { 13 | transition: none; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/mixins/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Visibility 4 | 5 | @mixin invisible($visibility) { 6 | visibility: $visibility !important; 7 | @include deprecate("`invisible()`", "v4.3.0", "v5"); 8 | } 9 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_align.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .align-baseline { vertical-align: baseline !important; } // Browser default 4 | .align-top { vertical-align: top !important; } 5 | .align-middle { vertical-align: middle !important; } 6 | .align-bottom { vertical-align: bottom !important; } 7 | .align-text-bottom { vertical-align: text-bottom !important; } 8 | .align-text-top { vertical-align: text-top !important; } 9 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_background.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $color, $value in $theme-colors { 4 | @include bg-variant(".bg-#{$color}", $value, true); 5 | } 6 | 7 | @if $enable-gradients { 8 | @each $color, $value in $theme-colors { 9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 10 | } 11 | } 12 | 13 | .bg-white { 14 | background-color: $white !important; 15 | } 16 | 17 | .bg-transparent { 18 | background-color: transparent !important; 19 | } 20 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_clearfix.scss: -------------------------------------------------------------------------------- 1 | .clearfix { 2 | @include clearfix(); 3 | } 4 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_display.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Utilities for common `display` values 5 | // 6 | 7 | @each $breakpoint in map-keys($grid-breakpoints) { 8 | @include media-breakpoint-up($breakpoint) { 9 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 10 | 11 | @each $value in $displays { 12 | .d#{$infix}-#{$value} { display: $value !important; } 13 | } 14 | } 15 | } 16 | 17 | 18 | // 19 | // Utilities for toggling `display` in print 20 | // 21 | 22 | @media print { 23 | @each $value in $displays { 24 | .d-print-#{$value} { display: $value !important; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $breakpoint in map-keys($grid-breakpoints) { 4 | @include media-breakpoint-up($breakpoint) { 5 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 6 | 7 | .float#{$infix}-left { float: left !important; } 8 | .float#{$infix}-right { float: right !important; } 9 | .float#{$infix}-none { float: none !important; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_overflow.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $value in $overflows { 4 | .overflow-#{$value} { overflow: $value !important; } 5 | } 6 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_position.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Common values 4 | @each $position in $positions { 5 | .position-#{$position} { position: $position !important; } 6 | } 7 | 8 | // Shorthand 9 | 10 | .fixed-top { 11 | position: fixed; 12 | top: 0; 13 | right: 0; 14 | left: 0; 15 | z-index: $zindex-fixed; 16 | } 17 | 18 | .fixed-bottom { 19 | position: fixed; 20 | right: 0; 21 | bottom: 0; 22 | left: 0; 23 | z-index: $zindex-fixed; 24 | } 25 | 26 | .sticky-top { 27 | @supports (position: sticky) { 28 | position: sticky; 29 | top: 0; 30 | z-index: $zindex-sticky; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_screenreaders.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Screenreaders 3 | // 4 | 5 | .sr-only { 6 | @include sr-only(); 7 | } 8 | 9 | .sr-only-focusable { 10 | @include sr-only-focusable(); 11 | } 12 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_shadows.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .shadow-sm { box-shadow: $box-shadow-sm !important; } 4 | .shadow { box-shadow: $box-shadow !important; } 5 | .shadow-lg { box-shadow: $box-shadow-lg !important; } 6 | .shadow-none { box-shadow: none !important; } 7 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_sizing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Width and height 4 | 5 | @each $prop, $abbrev in (width: w, height: h) { 6 | @each $size, $length in $sizes { 7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; } 8 | } 9 | } 10 | 11 | .mw-100 { max-width: 100% !important; } 12 | .mh-100 { max-height: 100% !important; } 13 | 14 | // Viewport additional helpers 15 | 16 | .min-vw-100 { min-width: 100vw !important; } 17 | .min-vh-100 { min-height: 100vh !important; } 18 | 19 | .vw-100 { width: 100vw !important; } 20 | .vh-100 { height: 100vh !important; } 21 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_stretched-link.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Stretched link 3 | // 4 | 5 | .stretched-link { 6 | &::after { 7 | position: absolute; 8 | top: 0; 9 | right: 0; 10 | bottom: 0; 11 | left: 0; 12 | z-index: 1; 13 | // Just in case `pointer-events: none` is set on a parent 14 | pointer-events: auto; 15 | content: ""; 16 | // IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color 17 | background-color: rgba(0, 0, 0, 0); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/IdentityServer4/wwwroot/lib/bootstrap/scss/utilities/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Visibility utilities 5 | // 6 | 7 | .visible { 8 | visibility: visible !important; 9 | } 10 | 11 | .invisible { 12 | visibility: hidden !important; 13 | } 14 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.MVC/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) 3 | * See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers 4 | * for more information concerning the license and the contributors participating to this project. 5 | */ 6 | 7 | using Microsoft.AspNetCore.Mvc; 8 | 9 | namespace VoVo.AspNetCore.OAuth2.MVC.Controllers 10 | { 11 | public class HomeController : Controller 12 | { 13 | [HttpGet("~/")] 14 | public ActionResult Index() => View(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.MVC/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | 4 | namespace VoVo.AspNetCore.OAuth2.MVC 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IHostBuilder CreateHostBuilder(string[] args) => 14 | Host.CreateDefaultBuilder(args) 15 | .ConfigureWebHostDefaults(webBuilder => 16 | { 17 | webBuilder.UseStartup(); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.MVC/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "OvOv.AspNetCore.OAuth2.MVC": { 5 | "commandName": "Project", 6 | "launchBrowser": true, 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | }, 10 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 11 | }, 12 | "Docker": { 13 | "commandName": "Docker", 14 | "launchBrowser": true, 15 | "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", 16 | "publishAllPorts": true, 17 | "useSSL": true 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.MVC/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | 
2 | @if (User?.Identity?.IsAuthenticated ?? false) 3 | { 4 |

Welcome, @User.Identity.Name

5 | 6 |

7 | @foreach (var claim in Context.User.Claims) 8 | { 9 |

@claim.Type: @claim.Value
10 | } 11 |

12 | 13 | Sign out 14 | } 15 | 16 | else 17 | { 18 |

Welcome, anonymous

19 | Sign in 20 | } 21 |
22 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.MVC/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.MVC/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.MVC/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.WebAPI/LinConsts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace VoVo.AspNetCore.OAuth2.WebAPI 7 | { 8 | public static class LinConsts 9 | { 10 | public static class Claims 11 | { 12 | public const string BIO = "urn:github:bio"; 13 | public const string AvatarUrl = "urn:github:avatar_url"; 14 | public const string BlogAddress = "urn:github:blog"; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.WebAPI/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/OvOv.AspNetCore.OAuth2.WebAPI/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "WithOrigins": [ "http://localhost:8080" ], 11 | "Authentication": { 12 | "JwtBearer": { 13 | "SecurityKey": "JWTStudyWebsite_DI20DXU3", 14 | "Issuer": "JWTStudy", 15 | "Audience": "JWTStudyWebsite" 16 | }, 17 | "GitHub": { 18 | "ClientId": "0be6b05fc717bfc4fb67", 19 | "ClientSecret": "dcaced9f176afba64e89d88b9b06ffc4a887a609" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | ovov.aspnetcore.oauth2.mvc: 5 | image: ${DOCKER_REGISTRY-}ovovaspnetcoreoauth2mvc 6 | build: 7 | context: . 8 | dockerfile: OvOv.AspNetCore.OAuth2.MVC/Dockerfile 9 | 10 | ovov.aspnetcore.oauth2.webapi: 11 | image: ${DOCKER_REGISTRY-}ovovaspnetcoreoauth2webapi 12 | build: 13 | context: . 14 | dockerfile: OvOv.AspNetCore.OAuth2.WebAPI/Dockerfile 15 | 16 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/README.md: -------------------------------------------------------------------------------- 1 | # spa-vue-oauth2 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn run build 16 | ``` 17 | 18 | ### Run your tests 19 | ``` 20 | yarn run test 21 | ``` 22 | 23 | ### Lints and fixes files 24 | ``` 25 | yarn run lint 26 | ``` 27 | 28 | ### Customize configuration 29 | See [Configuration Reference](https://cli.vuejs.org/config/). 30 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/public/favicon.ico -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | spa-vue-oauth2 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/src/assets/logo.png -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/src/config/index.js: -------------------------------------------------------------------------------- 1 | const Config = { 2 | // baseUrl: 'http://124.70.130.97:5016/', 3 | baseUrl: 'https://localhost:5001/' 4 | } 5 | 6 | export default Config; -------------------------------------------------------------------------------- /Authentication-and-Authorization/aspnetcore-oatuth2/spa-vue-oauth2/vue.config.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = { 3 | runtimeCompiler: true 4 | } 5 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/docker-compose.override.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | apiservice: 5 | environment: 6 | - ASPNETCORE_ENVIRONMENT=Development 7 | ports: 8 | - "80" 9 | 10 | identityserver4.service: 11 | environment: 12 | - ASPNETCORE_ENVIRONMENT=Development 13 | ports: 14 | - "80" 15 | 16 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | apiservice: 5 | image: ${DOCKER_REGISTRY-}apiservice 6 | build: 7 | context: . 8 | dockerfile: ApiService/Dockerfile 9 | 10 | identityserver4.service: 11 | image: ${DOCKER_REGISTRY-}identityserver4service 12 | build: 13 | context: . 14 | dockerfile: IdentityServer4/Dockerfile 15 | 16 | -------------------------------------------------------------------------------- /Authentication-and-Authorization/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Docker Compose": { 4 | "commandName": "DockerCompose", 5 | "commandVersion": "1.0", 6 | "serviceActions": { 7 | "apiservice": "StartDebugging", 8 | "identityserver4.service": "StartDebugging" 9 | } 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Caching/OvOv.CsRedis.Console/OvOv.CsRedis.ConsoleDemo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Caching/OvOv.CsRedis/Domain/UserInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace OvOv.CsRedis.Domain 7 | { 8 | public class UserInfo 9 | { 10 | public UserInfo(int id, string name, int age) 11 | { 12 | Id = id; 13 | Name = name; 14 | Age = age; 15 | } 16 | 17 | public int Id { get; set; } 18 | 19 | public string Name { get; set; } 20 | 21 | public int Age { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Caching/OvOv.CsRedis/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | using OvOv.CsRedis; 4 | 5 | namespace OvOv.CsRedis 6 | { 7 | public class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | CreateWebHostBuilder(args).Build().Run(); 12 | } 13 | 14 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 15 | WebHost.CreateDefaultBuilder(args) 16 | .UseStartup(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Caching/OvOv.CsRedis/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Caching/OvOv.CsRedis/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "CsRedisConfig": { 3 | "DefaultConnectString": "127.0.0.1:6379,password=,defaultDatabase=0,prefix=csredis-default-", 4 | "SentinelConnectString": "mymaster,password=,prefix=csredis-example-", 5 | "Sentinel": [ 6 | "127.0.0.1:26379", 7 | "127.0.0.1:26380", 8 | "127.0.0.1:26381" 9 | ] 10 | }, 11 | "Logging": { 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | }, 16 | "AllowedHosts": "*" 17 | } 18 | -------------------------------------------------------------------------------- /Caching/OvOv.StackExchange.Redis/OvOv.StackExchange.Redis.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | InProcess 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Caching/OvOv.StackExchange.Redis/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace StackExchange.Redis.Example 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Caching/OvOv.StackExchange.Redis/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "StackExchange.Redis.Example": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "launchUrl": "api/values", 7 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 8 | "environmentVariables": { 9 | "ASPNETCORE_ENVIRONMENT": "Development" 10 | } 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Caching/OvOv.StackExchange.Redis/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Caching/OvOv.StackExchange.Redis/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /ChromiumWebBrowser/ChromiumWebBrowser/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ChromiumWebBrowser/ChromiumWebBrowser/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ChromiumWebBrowser/ChromiumWebBrowser/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace WpfApp1 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ChromiumWebBrowser/ChromiumWebBrowser/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ChromiumWebBrowser/ChromiumWebBrowser/Readme.md: -------------------------------------------------------------------------------- 1 | 添加ChromiumWebBrowser,可以试试用爬需要js,ajax异步操作渲染后的html 2 | 3 | 注意指定x86或x64运行,不能anycpu -------------------------------------------------------------------------------- /ChromiumWebBrowser/Readme.md: -------------------------------------------------------------------------------- 1 | 添加ChromiumWebBrowser,可以试试用爬需要js,ajax异步操作渲染后的html 2 | 3 | 注意指定x86或x64运行,不能anycpu 4 | -------------------------------------------------------------------------------- /Console/CommandLineExamples/CommandLineExamples/CommandLineExamples.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Console/CommandLineExamples/DragonFruitExamples/DragonFruitExamples.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Console/CommandLineExamples/MyApp/MyApp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.DataBase/Db/AppDb.cs: -------------------------------------------------------------------------------- 1 | using MySql.Data.MySqlClient; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace DataBase.Db 8 | { 9 | public class AppDb : IDisposable 10 | { 11 | public MySqlConnection Connection; 12 | public AppDb(string connectionString) 13 | { 14 | Connection = new MySqlConnection(connectionString); 15 | } 16 | public void Dispose() 17 | { 18 | if (Connection != null && Connection.State != System.Data.ConnectionState.Closed) 19 | { 20 | Connection.Close(); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.DataBase/OvOv.Db.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.DataBase/Program.cs: -------------------------------------------------------------------------------- 1 | using DataBase.Db; 2 | var builder = WebApplication.CreateBuilder(args); 3 | builder.Services.AddControllers(); 4 | builder.Services.AddEndpointsApiExplorer(); 5 | builder.Services.AddSwaggerGen(); 6 | 7 | builder.Services.AddTransient(_ => new AppDb(builder.Configuration["ConnectionStrings:DefaultConnection"])); 8 | 9 | var app = builder.Build(); 10 | 11 | if (app.Environment.IsDevelopment()) 12 | { 13 | app.UseSwagger(); 14 | app.UseSwaggerUI(); 15 | } 16 | 17 | app.UseHttpsRedirection(); 18 | 19 | app.UseAuthorization(); 20 | 21 | app.MapControllers(); 22 | 23 | app.Run(); 24 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.DataBase/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.DataBase/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "ConnectionStrings": { 9 | "DefaultConnection": "server=127.0.0.1;user id=root;password=123456;port=3306;database=blog;" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.Db.Test/UnitTest1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Database-Drivers/OvOv.Db.Test/UnitTest1.cs -------------------------------------------------------------------------------- /Database-Drivers/OvOv.Db.Test/ValuesControllerTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using DataBase.Areas.Plat.Controllers; 5 | using Xunit; 6 | 7 | namespace OvOv.Db.Test 8 | { 9 | public class ValuesControllerTest 10 | { 11 | [Fact] 12 | public void Get() 13 | { 14 | string value= new ValuesController().Get(); 15 | Assert.Equal("ok", value); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.FreeSqlMicrosoftSqliteCore/OvOv.FreeSqlMicrosoftSqliteCore.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net7.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.FreeSqlMicrosoftSqliteCore/README.md: -------------------------------------------------------------------------------- 1 |  2 | 3 | ## FreeSql.Provider.SqliteCore 4 | 5 | 由于目前处于测试阶段,可使用**myget**源安装`FreeSql.Provider.SqliteCore`包。 6 | 7 | ```console 8 | dotnet add package FreeSql.Provider.SqliteCore --source https://www.myget.org/F/ncc/api/v3/index.json --prerelease 9 | ``` -------------------------------------------------------------------------------- /Database-Drivers/OvOv.SqliteMicrosoft/OvOv.SqliteMicrosoft.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net7.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.SqliteMicrosoft/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Data.Sqlite; 2 | 3 | 4 | static void Open() 5 | { 6 | string baseConnectionString = "Data Source=local.db"; 7 | var connectionString = new SqliteConnectionStringBuilder(baseConnectionString) 8 | { 9 | Mode = SqliteOpenMode.ReadWriteCreate, 10 | Password = "123qwe" 11 | }.ToString(); 12 | 13 | using SqliteConnection? connection = new SqliteConnection(connectionString); 14 | connection.Open(); 15 | } 16 | 17 | 18 | Open(); -------------------------------------------------------------------------------- /Database-Drivers/OvOv.SqliteMicrosoftCore/OvOv.SqliteMicrosoftCore.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net7.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.SqliteSystemCore/OvOv.SqliteSystemCore.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net7.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Database-Drivers/OvOv.SqliteSystemCore/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Data.SQLite; 2 | 3 | static void Open() 4 | { 5 | string baseConnectionString = "Data Source=local.db"; 6 | var connectionString = new SQLiteConnectionStringBuilder(baseConnectionString) 7 | { 8 | Password = "123qwe" 9 | }.ToString(); 10 | 11 | using SQLiteConnection? connection = new SQLiteConnection(connectionString); 12 | connection.Open(); 13 | } 14 | 15 | 16 | Open(); -------------------------------------------------------------------------------- /Frameworks/Nacos/NacosApi/Controllers/UserInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NacosApi.Controllers 2 | { 3 | public class UserInfo 4 | { 5 | public string Name { get; set; } 6 | public string Sex { get; set; } 7 | public int Age { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Frameworks/Nacos/NacosApi/NacosApi.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Frameworks/Nacos/NacosApi/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Frameworks/Nacos/NacosConsole/DemoConfigListener.cs: -------------------------------------------------------------------------------- 1 | using Nacos.V2; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace NacosConsole; 9 | 10 | class DemoConfigListener : IListener 11 | { 12 | public void ReceiveConfigInfo(string configInfo) 13 | { 14 | Console.WriteLine($"================收到配置变更信息了 ===》{configInfo}"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Frameworks/Nacos/NacosConsole/NacosConsole.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | PreserveNewest 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Frameworks/Nacos/NacosConsole/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | }, 8 | "EventLog": { 9 | "LogLevel": { 10 | "Default": "Debug" 11 | } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Frameworks/Nacos/README.md: -------------------------------------------------------------------------------- 1 | # Nacos 2 | 3 | ## [Github](https://igeekfan.cn/dotnetcore/examples/nacos-aspnetcore.html) 4 | 5 | ## [Gitee](https://igeekfan.cn/dotnetcore/examples/nacos-aspnetcore.html) 6 | -------------------------------------------------------------------------------- /Frameworks/aspnetcore_basic/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "aspnetcore_basic": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "launchUrl": "swagger", 9 | "applicationUrl": "https://localhost:7270;http://localhost:5270", 10 | "environmentVariables": { 11 | "ASPNETCORE_ENVIRONMENT": "Development" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Frameworks/aspnetcore_basic/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace WebApplication3 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Frameworks/aspnetcore_basic/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Frameworks/aspnetcore_basic/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "Basic": { 10 | "Realm": "localhost", 11 | "UserName": "admin", 12 | "UserPwd": "123qwe" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Frameworks/aspnetcore_basic/aspnetcore_basic.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /IOC/OvOv.ActionFilterDemo/LoggerAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OvOv.ActionFilterDemo 4 | { 5 | [AttributeUsage(AttributeTargets.Method)] 6 | public class LoggerAttribute:Attribute 7 | { 8 | public LoggerAttribute(string template) 9 | { 10 | Template = template ?? throw new ArgumentNullException(nameof(template)); 11 | } 12 | 13 | public string Template { get; set; } 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /IOC/OvOv.ActionFilterDemo/OvOv.ActionFilterDemo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | True 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /IOC/OvOv.ActionFilterDemo/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "OvOv.ActionFilterDemo": { 5 | "commandName": "Project", 6 | "launchBrowser": true, 7 | "launchUrl": "swagger", 8 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /IOC/OvOv.ActionFilterDemo/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OvOv.ActionFilterDemo 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /IOC/OvOv.ActionFilterDemo/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /IOC/OvOv.ActionFilterDemo/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /IOC/OvOv.AutoFac/CatInterceptor.cs: -------------------------------------------------------------------------------- 1 | using Castle.DynamicProxy; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace OvOv.AutoFac 7 | { 8 | public class CatInterceptor : IInterceptor 9 | { 10 | public void Intercept(IInvocation invocation) 11 | { 12 | Console.WriteLine("CatInterceptor猫吃东西前"); 13 | invocation.Proceed(); 14 | Console.WriteLine("CatInterceptor猫吃东西后"); 15 | Console.WriteLine(); 16 | 17 | } 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /IOC/OvOv.AutoFac/CatProxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace OvOv.AutoFac 6 | { 7 | 8 | 9 | public class CatProxy : ICat 10 | { 11 | private readonly ICat cat; 12 | public CatProxy(ICat cat) 13 | { 14 | this.cat = cat; 15 | } 16 | 17 | public void Eat() 18 | { 19 | Console.WriteLine("CatProxy猫在吃东西前"); 20 | cat.Eat(); 21 | Console.WriteLine("CatProxy猫在吃东西后"); 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /IOC/OvOv.AutoFac/ICat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace OvOv.AutoFac 6 | { 7 | public interface ICat 8 | { 9 | void Eat(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /IOC/OvOv.AutoFac/OvOv.AutoFac.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Logging/OvOv.NLog.Web/OvOv.Nlog.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Logging/OvOv.NLog.Web/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | 4 | namespace OvOv.Nlog 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IHostBuilder CreateHostBuilder(string[] args) => 14 | Host.CreateDefaultBuilder(args) 15 | .ConfigureWebHostDefaults(webBuilder => 16 | { 17 | webBuilder.UseStartup(); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Logging/OvOv.NLog.Web/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OvOv.Nlog 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Logging/OvOv.NLog.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Logging/OvOv.NLog.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.ConsoleDemo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.MsSql/OvOv.Serilog.MsSql.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | PreserveNewest 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.MsSql/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "LogDatabase": "Server=localhost;Database=LogDatabase;User id=sa;Password=123456;Integrated Security=SSPI;" 4 | }, 5 | "Serilog": { 6 | "SinkOptions": { 7 | "batchPostingLimit": 5, 8 | "batchPeriod": "00:00:15" 9 | }, 10 | "ColumnOptions": { 11 | "addStandardColumns": [ "LogEvent" ], 12 | "removeStandardColumns": [ "MessageTemplate", "Properties" ], 13 | "timeStamp": { 14 | "columnName": "Timestamp", 15 | "convertToUtc": false 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.Web/Filter/MvcGlobalExceptionFilter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc.Filters; 2 | using Microsoft.Extensions.Logging; 3 | 4 | namespace OvOv.Serilog.Filter 5 | { 6 | public class MvcGlobalExceptionFilter : IExceptionFilter 7 | { 8 | private readonly ILogger _logger; 9 | 10 | public MvcGlobalExceptionFilter(ILoggerFactory logger) 11 | { 12 | _logger = logger.CreateLogger("MvcGlobalExceptionFilter"); 13 | } 14 | 15 | public void OnException(ExceptionContext context) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.Web/OvOv.Serilog.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.Web/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OvOv.Serilog 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Logging/OvOv.Serilog.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/AutoMapper/BlogProfile.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using OvOv.Core.Domain; 3 | using OvOv.Core.Models.Blogs; 4 | 5 | namespace OvOv.Core.AutoMapper 6 | { 7 | public class BlogProfile : Profile 8 | { 9 | public BlogProfile() 10 | { 11 | CreateMap(); 12 | CreateMap(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Domain/Classify.cs: -------------------------------------------------------------------------------- 1 | using FreeSql.DataAnnotations; 2 | using System.Collections.Generic; 3 | 4 | namespace OvOv.Core.Domain 5 | { 6 | /// 7 | /// 分类 8 | /// 9 | public class Classify 10 | { 11 | [Column(IsIdentity = true, IsPrimary = true)] 12 | public int Id { get; set; } 13 | /// 14 | /// 排序 15 | /// 16 | public int SortCode { get; set; } 17 | /// 18 | /// 分类专栏名称 19 | /// 20 | [Column(DbType = "varchar(50)")] 21 | public string ClassifyName { get; set; } 22 | 23 | public virtual List Articles { get; set; } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Domain/ISoftDelete.cs: -------------------------------------------------------------------------------- 1 | namespace OvOv.Core.Domain 2 | { 3 | public interface ISoftDelete 4 | { 5 | bool IsDeleted { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Domain/Tag.cs: -------------------------------------------------------------------------------- 1 | using FreeSql.DataAnnotations; 2 | 3 | namespace OvOv.Core.Domain 4 | { 5 | public class Tag : ISoftDelete 6 | { 7 | [Column(IsIdentity = true, IsPrimary = true)] 8 | public int Id { get; set; } 9 | public string TagName { get; set; } 10 | 11 | public bool IsDeleted { get; set; } 12 | 13 | public int BlogId { get; set; } 14 | 15 | [Navigate(nameof(Id))] 16 | public Blog Blog { get; set; } 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Domain/User.cs: -------------------------------------------------------------------------------- 1 | using FreeSql.DataAnnotations; 2 | 3 | namespace OvOv.Core.Domain 4 | { 5 | public class User : ISoftDelete 6 | { 7 | [Column(IsIdentity = true, IsPrimary = true)] 8 | public int Id { get; set; } 9 | public bool IsDeleted { get; set; } 10 | 11 | public string Name { get; set; } 12 | 13 | [Column(DbType = "json")] 14 | public string Extra { get; set; } 15 | 16 | } 17 | 18 | public class ExtraJson 19 | { 20 | public string Salt { get; set; } 21 | 22 | public string Password { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Extensions/CollectionsExtensions.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | using OvOv.Core.Web; 3 | 4 | namespace OvOv.Core.Extensions 5 | { 6 | public static class CollectionsExtensions 7 | { 8 | public static ISelect Page(this ISelect source, PageDto pageDto) where T : class, new() 9 | { 10 | return source.Page(pageDto.PageNumber, pageDto.PageNumber); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Models/Blogs/CreateBlogDto.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OvOv.Core.Models.Blogs 4 | { 5 | public class CreateBlogDto 6 | { 7 | public string Title { get; set; } 8 | public string Content { get; set; } 9 | public string NameSting { get; set; } 10 | 11 | public List Tags { get; set; } 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Models/Blogs/UpdateBlogDto.cs: -------------------------------------------------------------------------------- 1 | namespace OvOv.Core.Models.Blogs 2 | { 3 | public class UpdateBlogDto 4 | { 5 | public int Id { get; set; } 6 | public string Title { get; set; } 7 | public string Content { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Models/Users/CreateUserDto.cs: -------------------------------------------------------------------------------- 1 | using OvOv.Core.Domain; 2 | 3 | namespace OvOv.Core.Models 4 | { 5 | public class CreateUserDto 6 | { 7 | public string Name { get; set; } 8 | 9 | public ExtraJson ExtraJson { get; set; } 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/OvOv.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net7.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Core/Web/PageDto.cs: -------------------------------------------------------------------------------- 1 | namespace OvOv.Core.Web 2 | { 3 | /// 4 | /// 分页信息 5 | /// 6 | public class PageDto 7 | { 8 | /// 9 | /// 一页多少个数据 10 | /// 11 | public int PageSize { get; set; } = 10; 12 | 13 | /// 14 | /// 第几页,从1开始。 15 | /// 16 | public int PageNumber { get; set; } = 1; 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/OvOvDbContext.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | using OvOv.Core.Domain; 3 | 4 | namespace OvOv.FreeSql.AutoFac.DynamicProxy 5 | { 6 | public class OvOvDbContext : DbContext 7 | { 8 | public DbSet Blogs { get; set; } 9 | public DbSet Tags { get; set; } 10 | 11 | protected override void OnConfiguring(DbContextOptionsBuilder builder) 12 | { 13 | } 14 | 15 | protected override void OnModelCreating(ICodeFirst codefirst) 16 | { 17 | codefirst.Entity(r => 18 | { 19 | r.Property(r => r.Version).IsRowVersion().Help().MapType(typeof(byte[])); 20 | }); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:46057", 8 | "sslPort": 44369 9 | } 10 | }, 11 | "profiles": { 12 | "OvOv.FreeSql.AutoFac.DynamicProxy": { 13 | "commandName": "Project", 14 | "launchBrowser": true, 15 | "launchUrl": "", 16 | "applicationUrl": "https://localhost:15001;http://localhost:15000", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/Repositories/BlogRepository.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | using OvOv.Core.Domain; 3 | using System.Collections.Generic; 4 | 5 | namespace OvOv.FreeSql.AutoFac.DynamicProxy.Repositories 6 | { 7 | public class BlogRepository : DefaultRepository, IBlogRepository 8 | { 9 | public BlogRepository(UnitOfWorkManager uowm) : base(uowm?.Orm, uowm) 10 | { 11 | } 12 | 13 | public List GetBlogs() 14 | { 15 | return Select.Page(1, 10).ToList(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/Repositories/IBlogRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FreeSql; 3 | using OvOv.Core.Domain; 4 | 5 | namespace OvOv.FreeSql.AutoFac.DynamicProxy.Repositories 6 | { 7 | public interface IBlogRepository : IBaseRepository 8 | { 9 | 10 | List GetBlogs(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/Repositories/ITagRepository.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | using OvOv.Core.Domain; 3 | 4 | namespace OvOv.FreeSql.AutoFac.DynamicProxy.Repositories 5 | { 6 | public interface ITagRepository : IBaseRepository 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/Repositories/TagRepository.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | using OvOv.Core.Domain; 3 | 4 | namespace OvOv.FreeSql.AutoFac.DynamicProxy.Repositories 5 | { 6 | public class TagRepository : DefaultRepository,ITagRepository 7 | { 8 | public TagRepository(UnitOfWorkManager uowm) : base(uowm?.Orm, uowm) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/TransactionalAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data; 3 | using FreeSql; 4 | 5 | namespace OvOv.FreeSql.AutoFac.DynamicProxy 6 | { 7 | /// 8 | /// 标志事务的特性标签 9 | /// 10 | /// 11 | [AttributeUsage(AttributeTargets.Method, Inherited = true)] 12 | public class TransactionalAttribute : Attribute 13 | { 14 | /// 15 | /// 事务传播方式 16 | /// 17 | public Propagation Propagation { get; set; } = Propagation.Required; 18 | 19 | /// 20 | /// 事务隔离级别 21 | /// 22 | public IsolationLevel? IsolationLevel { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.AutoFac.DynamicProxy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Default": "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=ovov_freesql_repository;Charset=utf8;SslMode=none;Max pool size=10", 3 | "MariaDB": "Data Source=127.0.0.1;Port=3308;User ID=root;Password=123456;Initial Catalog=ovov_freesql_repository;Charset=utf8;SslMode=none;Max pool size=10", 4 | "SqlServer": "Data Source=.;Integrated Security=True;Initial Catalog=ovov_freesql_repository;Pooling=true;Min Pool Size=1", 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.IdleBus/IDeleted.cs: -------------------------------------------------------------------------------- 1 | namespace OvOv.FreeSql.IdleBus 2 | { 3 | public interface IDeleted 4 | { 5 | public bool IsDeleted { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.IdleBus/OvOv.FreeSql.IdleBus.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.IdleBus/Startup.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/ORM/FreeSql/OvOv.FreeSql.IdleBus/Startup.cs -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.IdleBus/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OvOv.FreeSql.IdleBus 4 | { 5 | public class WeatherForecast : IDeleted 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | public bool IsDeleted { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.IdleBus/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.IdleBus/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/Program.cs: -------------------------------------------------------------------------------- 1 |  2 | using FreeSql; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.Extensions.Hosting; 5 | 6 | namespace OvOv.FreeSql.Repository 7 | { 8 | public class Program 9 | { 10 | public static void Main(string[] args) 11 | { 12 | CreateWebHostBuilder(args).Build().Run(); 13 | } 14 | 15 | public static IHostBuilder CreateWebHostBuilder(string[] args) => 16 | Host.CreateDefaultBuilder(args) 17 | .ConfigureWebHostDefaults(webBuilder => 18 | { 19 | webBuilder.UseStartup(); 20 | }) 21 | .UseServiceProviderFactory(new DynamicProxyServiceProviderFactory()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "OvOv.FreeSql.Repository": { 5 | "commandName": "Project", 6 | "launchBrowser": true, 7 | "launchUrl": "", 8 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/Repositories/BlogRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FreeSql; 3 | using OvOv.Core.Domain; 4 | 5 | namespace OvOv.FreeSql.Repository.Repositories 6 | { 7 | public class BlogRepository : DefaultRepository, IBlogRepository 8 | { 9 | public BlogRepository(UnitOfWorkManager uowm) : base(uowm?.Orm, uowm) 10 | { 11 | } 12 | 13 | public List GetBlogs() 14 | { 15 | return Select.Page(1, 10).ToList(); 16 | } 17 | 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/Repositories/IBlogRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FreeSql; 3 | using OvOv.Core.Domain; 4 | 5 | namespace OvOv.FreeSql.Repository.Repositories 6 | { 7 | public interface IBlogRepository : IBaseRepository 8 | { 9 | 10 | List GetBlogs(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/Repositories/ITagRepository.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | using OvOv.Core.Domain; 3 | 4 | namespace OvOv.FreeSql.Repository.Repositories 5 | { 6 | public interface ITagRepository : IBaseRepository 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/Repositories/TagRepository.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | using OvOv.Core.Domain; 3 | 4 | namespace OvOv.FreeSql.Repository.Repositories 5 | { 6 | public class TagRepository : DefaultRepository,ITagRepository 7 | { 8 | public TagRepository(UnitOfWorkManager uowm) : base(uowm?.Orm, uowm) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql.Repository/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectString": "Mysql", 3 | "Mysql": "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=ovov_freesql_repository;Charset=utf8;SslMode=none;Max pool size=10", 4 | "MssqlServer": "Data Source=.;Integrated Security=True;Initial Catalog=ovov_freesql_repository;Pooling=true;Min Pool Size=1", 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Warning" 8 | } 9 | }, 10 | "AllowedHosts": "*" 11 | } 12 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql/Controllers/DepController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace OvOv.FreeSql.Controllers 4 | { 5 | [Route("api/[controller]")] 6 | [ApiController] 7 | public class DepController : ControllerBase 8 | { 9 | private IFreeSql _fsql; 10 | public DepController(IFreeSql fsql) 11 | { 12 | _fsql = fsql; 13 | } 14 | 15 | [HttpPost] 16 | public long Post([FromBody] DepInfo depDto) 17 | { 18 | return _fsql.Insert(depDto).ExecuteIdentity(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql/DepInfo.cs: -------------------------------------------------------------------------------- 1 |  2 | using FreeSql.DataAnnotations; 3 | 4 | namespace OvOv.FreeSql 5 | { 6 | public class DepInfo 7 | { 8 | [Column(IsIdentity = true, IsPrimary = true)] 9 | public int DEPARTMENTID { get; set; } 10 | public string DepName { get; set; } 11 | 12 | public DepType DepType { get; set; } 13 | } 14 | 15 | public enum DepType 16 | { 17 | TEST, 18 | TEST2 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | 4 | namespace OvOv.FreeSql 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateWebHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IHostBuilder CreateWebHostBuilder(string[] args) => 14 | Host.CreateDefaultBuilder(args) 15 | .ConfigureWebHostDefaults(webBuilder => 16 | { 17 | webBuilder.UseStartup(); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "OvOv.FreeSql": { 5 | "commandName": "Project", 6 | "launchBrowser": true, 7 | "launchUrl": "", 8 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.FreeSql/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySql": "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=ovov_freesql_repository;Charset=utf8mb4;SslMode=none;Max pool size=10", 3 | "MariaDB": "Data Source=127.0.0.1;Port=3308;User ID=root;Password=123456;Initial Catalog=ovov_freesql_repository;Charset=utf8mb4;SslMode=none;Max pool size=10", 4 | "SqlServer": "Data Source=.;Integrated Security=True;Initial Catalog=ovov_freesql_repository;Pooling=true;Min Pool Size=1", 5 | //"AttachDBFilename=D": "\\\\code\\\\db\\\\ovov_freesql_repository.mdf;", 6 | "Logging": { 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | }, 11 | "AllowedHosts": "*" 12 | } 13 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Razor/CopyRightTemplate.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | var gen = Model as OvOv.Razor.CopyRightUserInfo; 3 | } 4 | //============================================================= 5 | // 创建人: @gen.UserName 6 | // 创建时间: @gen.CreateTime 7 | // 邮箱: @gen.EmailAddress 8 | //============================================================== 9 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Razor/CopyRightUserInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace OvOv.Razor 3 | { 4 | public class CopyRightUserInfo 5 | { 6 | public string UserName { get; set; } 7 | public string EmailAddress { get; set; } 8 | public DateTime CreateTime { get; set; } 9 | public string FileRemark { get; set; } 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Razor/HelloWorld.cshtml: -------------------------------------------------------------------------------- 1 | Hello @Model.Name, welcome to RazorEngine! -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Razor/OvOv.Razor.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net7.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | PreserveNewest 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | PreserveNewest 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.Razor/RazorTemplateBase.cs: -------------------------------------------------------------------------------- 1 | namespace OvOv.Razor 2 | { 3 | public class RazorTemplateBase 4 | { 5 | public dynamic Model { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.WindowsFormsApp/ConfigInfo.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | 4 | using FreeSql.DataAnnotations; 5 | 6 | namespace WindowsFormsApp1 7 | { 8 | public class ConfigInfo 9 | { 10 | [Column(IsPrimary = true, IsIdentity = true)] 11 | public int Id { get; set; } 12 | public string ConfigKey { get; set; } 13 | public string ConfigValue { get; set; } 14 | public int Count { get; set; } 15 | [Column(DbType ="TimeStamp")] 16 | public DateTime CreateTime { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.WindowsFormsApp/OvOv.WindowsFormsApp.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net7.0-windows 6 | true 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.WindowsFormsApp/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace WindowsFormsApp1 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.SetHighDpiMode(HighDpiMode.SystemAware); 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new Form1()); 18 | 19 | 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ORM/FreeSql/OvOv.WindowsFormsApp/WinFromContext.cs: -------------------------------------------------------------------------------- 1 | using FreeSql; 2 | 3 | namespace WindowsFormsApp1 4 | { 5 | public class WinFromContext : DbContext 6 | { 7 | public DbSet ConfigInfo { get; set; } 8 | protected override void OnConfiguring(DbContextOptionsBuilder options) 9 | { 10 | options.UseFreeSql(DB.Sqlite); 11 | //base.OnConfiguring(options); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/InSqlDemo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/Models/AuthDbContext.cs: -------------------------------------------------------------------------------- 1 | using Insql; 2 | using System.Linq; 3 | 4 | namespace InSqlDemo.Models 5 | { 6 | public class AuthDbContext : DbContext 7 | { 8 | public AuthDbContext(DbContextOptions options) : base(options) 9 | { 10 | } 11 | 12 | public UserInfo GetUser(int userId) 13 | { 14 | //第一个参数与select id 对应,第二个数据参数支持PlainObject和IDictionary类型 15 | return Query(nameof(GetUser), new { userId }).SingleOrDefault(); 16 | } 17 | 18 | public void InsertUserSelective(UserInfo userinfo) 19 | { 20 | Execute(nameof(InsertUserSelective),userinfo); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/Models/RoleInfo.cs: -------------------------------------------------------------------------------- 1 | namespace InSqlDemo.Controllers 2 | { 3 | public class RoleInfo 4 | { 5 | public int id { get; set; } 6 | public int sort_order { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/Models/UserInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace InSqlDemo 4 | { 5 | public class UserInfo 6 | { 7 | public int user_id { get; set; } 8 | public string user_name { get; set; } 9 | public int user_gender { get; set; } 10 | public DateTime last_login_time { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:7408", 8 | "sslPort": 44314 9 | } 10 | }, 11 | "profiles": { 12 | "InSqlDemo": { 13 | "commandName": "Project", 14 | "launchBrowser": true, 15 | "launchUrl": "api/auth/getuser?userid=1", 16 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/Startup.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/ORM/InSql/InSqlDemo/Startup.cs -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "ConnectionStrings": { 11 | "sqlite": "Data Source= ./insql.tests.db", 12 | "MySql": "" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ORM/InSql/InSqlDemo/insql.tests.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/ORM/InSql/InSqlDemo/insql.tests.db -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Chat/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base 3 | COPY . /app 4 | WORKDIR /app 5 | EXPOSE 80 6 | ENTRYPOINT ["dotnet", "ImCore.Chat.dll"] -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Chat/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace ImCore.Chat 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Chat/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "ImCore.Chat": { 5 | "commandName": "Project", 6 | "launchBrowser": true, 7 | "launchUrl": "swagger", 8 | "environmentVariables": { 9 | "ASPNETCORE_ENVIRONMENT": "Development" 10 | }, 11 | "applicationUrl": "http://localhost:5000/" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Chat/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Chat/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Server/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base 3 | COPY . /app 4 | WORKDIR /app 5 | EXPOSE 80 6 | ENTRYPOINT ["dotnet", "ImCore.Server.dll"] -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Server/OvOv.ImCore.Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | InProcess 6 | 4308eda1-88d0-41aa-8e42-d8981edb6a84 7 | Linux 8 | ImCore.Server 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Server/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace ImCore.Server 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "ImCore.Server": { 5 | "commandName": "Project", 6 | "launchBrowser": true, 7 | "launchUrl": "", 8 | "environmentVariables": { 9 | "ASPNETCORE_ENVIRONMENT": "Development" 10 | }, 11 | "applicationUrl": "http://localhost:6001" 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Web-Socket/OvOv.ImCore.Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "ConnectionStrings": { 9 | "redis1": "127.0.0.1:6379,password=,defaultDatabase=13,poolsize=10,ssl=false,writeBuffer=20480,prefix=xxx", 10 | "redis2": "127.0.0.1:6379,password=,defaultDatabase=13,poolsize=10,ssl=false,writeBuffer=20480,prefix=xxx" 11 | }, 12 | 13 | "redischannel": "127.0.0.1:6001", 14 | "webchat_servers": [ 15 | "127.0.0.1:6001" 16 | //,"52.197.199.193:6001" 17 | ] 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Web-Socket/README.md: -------------------------------------------------------------------------------- 1 | #### [ImCore通讯组件](https://github.com/2881099/im) 2 | 基于webSocket 协议实现简易、高性能、集群即时通讯组件 3 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SignlarDemo.Models 4 | { 5 | public class ErrorViewModel 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | 4 | namespace SignlarDemo 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IHostBuilder CreateHostBuilder(string[] args) => 14 | Host.CreateDefaultBuilder(args) 15 | .ConfigureWebHostDefaults(webBuilder => 16 | { 17 | webBuilder.UseStartup(); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "SignlarDemo": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Startup.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Web-Socket/Signlar/SignlarDemo/Startup.cs -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using SignlarDemo 2 | @using SignlarDemo.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "Authentication": { 11 | "JwtBearer": { 12 | "SecurityKey": "lin-cms-dotnetcore-SecurityKey", 13 | "Issuer": "lin-cms-dotnetcore-Issuer", 14 | "Audience": "LinCms.Web" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Web-Socket/Signlar/SignlarDemo/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/Web-Socket/Signlar/SignlarDemo/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/GalaxyInfo.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorAppPWA 2 | { 3 | public class GalaxyInfo 4 | { 5 | public string GalaxyCluster { get; set; } 6 | public string GalaxyName { get; set; } 7 | public long StarCount { get; set; } 8 | 9 | public override string ToString() 10 | { 11 | return $"Galaxy: {GalaxyName}, Cluster: {GalaxyCluster}, Stars: {StarCount}"; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/Pages/payment.cs: -------------------------------------------------------------------------------- 1 | using RedsysTPV; 2 | using RedsysTPV.Models; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace BlazorAppPWA.Pages 9 | { 10 | public class payment 11 | { 12 | 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 7 | @using Microsoft.JSInterop 8 | @using BlazorAppPWA 9 | @using BlazorAppPWA.Shared 10 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "EPPlus": { 3 | "ExcelPackage": { 4 | "LicenseContext": "NonCommercial" //The license context used 5 | } 6 | }, 7 | "UserWebRoot": true, 8 | "UseSwagger": true, 9 | "RedisTimeoutSeconds": 10, 10 | 11 | "GalaxyStuff": { 12 | "GalaxyCluster": "Virgo Supercluster", 13 | "GalaxyName": "Milky Way", 14 | "StarCount": 300000000000 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/dataP.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | namespace BlazorAppPWA 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppPWA/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppPWA/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppPWA/wwwroot/icon-512.png -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlazorAppPWA", 3 | "short_name": "BlazorAppPWA", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "icons": [ 9 | { 10 | "src": "icon-512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/sample-data/weather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2018-05-06", 4 | "temperatureC": 1, 5 | "summary": "Freezing" 6 | }, 7 | { 8 | "date": "2018-05-07", 9 | "temperatureC": 14, 10 | "summary": "Bracing" 11 | }, 12 | { 13 | "date": "2018-05-08", 14 | "temperatureC": -13, 15 | "summary": "Freezing" 16 | }, 17 | { 18 | "date": "2018-05-09", 19 | "temperatureC": -16, 20 | "summary": "Balmy" 21 | }, 22 | { 23 | "date": "2018-05-10", 24 | "temperatureC": -2, 25 | "summary": "Chilly" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /blazor/BlazorAppPWA/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "blazorwasm", 9 | "name": "Launch and Debug Blazor WebAssembly Application", 10 | "request": "launch" 11 | }, 12 | { 13 | "type": "blazorwasm", 14 | "request": "attach", 15 | "name": "Attach to Existing Blazor WebAssembly Application" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 5 | using Microsoft.Extensions.DependencyInjection; 6 | 7 | namespace TodoList 8 | { 9 | public class Program 10 | { 11 | public static async Task Main(string[] args) 12 | { 13 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 14 | builder.RootComponents.Add("app"); 15 | 16 | builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 17 | 18 | await builder.Build().RunAsync(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "TodoList": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 7 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 8 | "environmentVariables": { 9 | "ASPNETCORE_ENVIRONMENT": "Development" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 4 |
5 | @Body 6 |
7 | -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Components.Routing 2 | @using Microsoft.AspNetCore.Components.Web 3 | @using Microsoft.JSInterop 4 | @using TodoList 5 | @using TodoList.Shared 6 | -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/wwwroot/css/icon.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Material Icons'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url(icon.woff2) format('woff2'); 6 | } 7 | 8 | .material-icons { 9 | font-family: 'Material Icons'; 10 | font-weight: normal; 11 | font-style: normal; 12 | font-size: 24px; 13 | line-height: 1; 14 | letter-spacing: normal; 15 | text-transform: none; 16 | display: inline-block; 17 | white-space: nowrap; 18 | word-wrap: normal; 19 | direction: ltr; 20 | -webkit-font-feature-settings: 'liga'; 21 | -webkit-font-smoothing: antialiased; 22 | } -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/wwwroot/css/icon.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppTodoList/wwwroot/css/icon.woff2 -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppTodoList/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorAppTodoList/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | TodoList 8 | 9 | 10 | 11 | 12 | 13 | 14 | Loading... 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/App.razor: -------------------------------------------------------------------------------- 1 | @using System.IO; 2 | @using System.Runtime.Loader; 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |

Sorry, there's nothing at this address.

11 |
12 |
13 |
14 | @code { 15 | 16 | System.Reflection.Assembly CustomClassLibrary; 17 | 18 | protected override void OnInitialized() 19 | { 20 | string path = Path.GetFullPath(@"CustomModules\CustomClassLibrary.dll"); 21 | CustomClassLibrary = AssemblyLoadContext.Default.LoadFromAssemblyPath(path); 22 | } 23 | } -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/Controllers/RestartAppModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace SharedClassLibrary 6 | { 7 | public class RestartAppModel 8 | { 9 | public string Messsage { get; set; } 10 | public bool IsSuccess { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/CustomModules/CustomClassLibrary.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/CustomModules/CustomClassLibrary.dll -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorAppUpgrader.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | BlazorAppUpgrader 11 | 12 | 13 | 14 | 15 | 16 | 17 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/Upgrade/CustomClassLibrary.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/Upgrade/CustomClassLibrary.dll -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/Upgrade/Placeholder.txt: -------------------------------------------------------------------------------- 1 | To ensure the directory is created -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/Uploads/Placeholder.txt: -------------------------------------------------------------------------------- 1 | To ensure the directory is created -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/Uploads/UpgradePackageVersionOne.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/Uploads/UpgradePackageVersionOne.zip -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/Uploads/UpgradePackageVersionTwo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/Uploads/UpgradePackageVersionTwo.zip -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorAppUpgrader -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/BlazorAppUpgrader/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/CustomClassLibrary/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | int currentCount = 0; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/CustomClassLibrary/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/CustomClassLibrary/Pages/_Imports.razor: -------------------------------------------------------------------------------- 1 | @layout MainLayout 2 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/CustomClassLibrary/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 |

Version One

10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/CustomClassLibrary/Shared/RestartAppModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace SharedClassLibrary 6 | { 7 | public class RestartAppModel 8 | { 9 | public string Messsage { get; set; } 10 | public bool IsSuccess { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/CustomClassLibrary/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.JSInterop 7 | @using CustomClassLibrary 8 | @using CustomClassLibrary.Shared -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/UpgradePackageVersionOne.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/UpgradePackageVersionOne.zip -------------------------------------------------------------------------------- /blazor/BlazorAppUpgrader/UpgradePackageVersionTwo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorAppUpgrader/UpgradePackageVersionTwo.zip -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 7 | @using Microsoft.JSInterop 8 | @using BlazorApp1 9 | @using BlazorApp1.Shared 10 | -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorClientSolo/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorClientSolo/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorClientSolo/wwwroot/icon-512.png -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlazorApp1", 3 | "short_name": "BlazorApp1", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "icons": [ 9 | { 10 | "src": "icon-512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/sample-data/weather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2018-05-06", 4 | "temperatureC": 1, 5 | "summary": "Freezing" 6 | }, 7 | { 8 | "date": "2018-05-07", 9 | "temperatureC": 14, 10 | "summary": "Bracing" 11 | }, 12 | { 13 | "date": "2018-05-08", 14 | "temperatureC": -13, 15 | "summary": "Freezing" 16 | }, 17 | { 18 | "date": "2018-05-09", 19 | "temperatureC": -16, 20 | "summary": "Balmy" 21 | }, 22 | { 23 | "date": "2018-05-10", 24 | "temperatureC": -2, 25 | "summary": "Chilly" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /blazor/BlazorClientSolo/wwwroot/service-worker.js: -------------------------------------------------------------------------------- 1 | // In development, always fetch from the network and do not enable offline support. 2 | // This is because caching would make development more difficult (changes would not 3 | // be reflected on the first load after each change). 4 | self.addEventListener('fetch', () => { }); 5 | -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Sorry, there's nothing at this address.

9 |
10 |
11 |
12 |
-------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 5 | using Microsoft.EntityFrameworkCore; 6 | 7 | namespace AME.Models 8 | { 9 | public class ApplicationDbContext : IdentityDbContext 10 | { 11 | public ApplicationDbContext(DbContextOptions options) 12 | : base(options) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorCookieAuth.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Pages/Login.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorCookieAuth.Server.Pages.LoginModel 3 | @{ 4 | ViewData["Title"] = "Log in"; 5 | } 6 |

Login

-------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Pages/LoginGoogle.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorCookieAuth.Server.Pages.LoginGoogleModel 3 | @{ 4 | ViewData["Title"] = "Login Google"; 5 | } 6 |

Login

-------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Pages/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorCookieAuth.Server.Pages.LogoutModel 3 | @{ 4 | ViewData["Title"] = "Logout"; 5 | } 6 |

Logout

-------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Pages/Logout.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Microsoft.AspNetCore.Authentication; 4 | using Microsoft.AspNetCore.Authentication.Cookies; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace BlazorCookieAuth.Server.Pages 9 | { 10 | public class LogoutModel : PageModel 11 | { 12 | public async Task OnGetAsync() 13 | { 14 | // Clear the existing external cookie 15 | await HttpContext 16 | .SignOutAsync( 17 | CookieAuthenticationDefaults.AuthenticationScheme); 18 | 19 | return LocalRedirect(Url.Content("~/")); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 5 |
6 |
7 | 8 |
9 |
10 | 11 |
12 |
13 | @Body 14 |
15 |
-------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorCookieAuth 9 | @using BlazorCookieAuth.Shared 10 | -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorCookieAuth/BlazorCookieAuth/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 |

Sorry, there's nothing at this address.

9 |
10 |
11 |
12 |
-------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/BlazorGmail.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | 7.3 6 | <_RazorComponentInclude>Components\**\*.cshtml 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | int currentCount = 0; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/Pages/Login.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorGmail.Server.Pages.LoginModel 3 | @{ 4 | ViewData["Title"] = "Log in"; 5 | } 6 |

Login

-------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/Pages/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model BlazorGmail.Server.Pages.LogoutModel 3 | @{ 4 | ViewData["Title"] = "Logout"; 5 | } 6 | 7 |

Logout

8 | 9 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorGmail.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | BlazorAzureActiveDirectory 11 | 12 | 13 | 14 | 15 | 16 | 17 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/Services/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorGmail.Services 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF { get; set; } 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 | 9 |
10 | 11 | 12 | 13 |
14 | 15 |
16 | @Body 17 |
18 |
19 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorGmail 9 | @using BlazorGmail.Shared 10 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Google": { 3 | "Instance": "https://accounts.google.com/o/oauth2/v2/auth", 4 | "ClientId": "{{{ YOUR APP ID }}}", 5 | "ClientSecret": "{{{ YOUR CLIENT SECRET }}}", 6 | "CallbackPath": "/signin-google" 7 | }, 8 | "Logging": { 9 | "LogLevel": { 10 | "Default": "Warning", 11 | "Microsoft.Hosting.Lifetime": "Information" 12 | } 13 | }, 14 | "AllowedHosts": "*" 15 | } -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorGmail/BlazorGmail/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /blazor/BlazorGmail/BlazorGmail/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorGmail/BlazorGmail/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorServer/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /blazor/BlazorServer/BlazorServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /blazor/BlazorServer/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorServer.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blazor/BlazorServer/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | int currentCount = 0; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /blazor/BlazorServer/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

-------------------------------------------------------------------------------- /blazor/BlazorServer/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | -------------------------------------------------------------------------------- /blazor/BlazorServer/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorServer.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | BlazorServer 11 | 12 | 13 | 14 | 15 | 16 | 17 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /blazor/BlazorServer/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /blazor/BlazorServer/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorServer 9 | @using BlazorServer.Shared 10 | -------------------------------------------------------------------------------- /blazor/BlazorServer/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /blazor/BlazorServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /blazor/BlazorServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/BlazorStateManagement.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorStateManagement.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 |
7 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorStateManagement.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | BlazorStateManagement 11 | 12 | 13 | 14 | 15 | 16 | 17 | @(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorStateManagement 9 | @using BlazorStateManagement.Shared 10 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luoyunchong/dotnetcore-examples/e355fe01a97dc3c4f29f57640ad579d739d5833b/blazor/BlazorStateManagement/BlazorStateManagement/wwwroot/favicon.ico -------------------------------------------------------------------------------- /dotnetcore-examples.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30011.22 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Global 7 | GlobalSection(SolutionProperties) = preSolution 8 | HideSolutionNode = FALSE 9 | EndGlobalSection 10 | GlobalSection(ExtensibilityGlobals) = postSolution 11 | SolutionGuid = {62D85ADF-77BA-45B1-B2B9-0AEAA2A7769B} 12 | EndGlobalSection 13 | EndGlobal 14 | --------------------------------------------------------------------------------