├── .gitignore ├── LICENSE ├── README.md ├── WorkerServiceSample.sln └── WorkerServiceSample ├── Program.cs ├── Utils └── DocMaker.cs ├── Worker.cs ├── WorkerServiceSample.csproj ├── appsettings.Development.json ├── appsettings.json ├── chapters ├── aspnetcore-az-ebook.docx ├── aspnetcore-az-ebook.pdf ├── aspnetcore-az-introduction.docx ├── authentication-authorization-in-asp-net-core-razor-pages.docx ├── blazor-full-stack-web-dev-in-asp-net-core.docx ├── cookies-and-consent-in-asp-net-core.docx ├── deploying-asp-net-core-to-azure-app-service.docx ├── ef-core-relationships-in-asp-net-core.docx ├── forms-and-fields-in-asp-net-core.docx ├── generic-host-builder-in-asp-net-core.docx ├── handling-errors-in-asp-net-core.docx ├── iis-hosting-for-asp-net-core-web-apps.docx ├── javascript-css-html-static-files-in-asp-net-core.docx ├── key-vault-for-asp-net-core-web-apps.docx ├── logging-in-asp-net-core.docx ├── middleware-in-asp-net-core.docx ├── net-core-3-vs2019-and-csharp-8.docx ├── organizational-accounts-for-asp-net-core.docx ├── production-tips-for-asp-net-core-web-apps.docx ├── query-tags-in-ef-core-for-asp-net-core.docx ├── razor-pages-in-asp-net-core.docx ├── summarizing-build-2019-signalr-service.docx ├── tag-helper-authoring-in-asp-net-core.docx ├── unit-testing-in-asp-net-core.docx ├── validation-in-asp-net-core.docx ├── worker-service-in-asp-net-core.docx ├── xml-json-serialization-in-asp-net-core.docx ├── yaml-defined-cicd-for-asp-net-core.docx └── zero-downtime-web-apps-for-asp-net-core.docx └── runtimes └── win └── lib ├── netcoreapp2.0 └── System.Diagnostics.EventLog.dll └── netstandard2.0 └── System.ServiceProcess.ServiceController.dll /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 shahedc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WorkerServiceSample 2 | ASP .NET Core 3.0 Worker Service Sample 3 | -------------------------------------------------------------------------------- /WorkerServiceSample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28803.452 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkerServiceSample", "WorkerServiceSample\WorkerServiceSample.csproj", "{03D4D8D1-2C57-4ED2-97DE-1A4D88768440}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {03D4D8D1-2C57-4ED2-97DE-1A4D88768440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {03D4D8D1-2C57-4ED2-97DE-1A4D88768440}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {03D4D8D1-2C57-4ED2-97DE-1A4D88768440}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {03D4D8D1-2C57-4ED2-97DE-1A4D88768440}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {95615927-8011-49D6-BF56-124A9558AAB8} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WorkerServiceSample/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.Hosting; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace WorkerServiceSample 10 | { 11 | public class Program 12 | { 13 | public static void Main(string[] args) 14 | { 15 | CreateHostBuilder(args).Build().Run(); 16 | } 17 | 18 | public static IHostBuilder CreateHostBuilder(string[] args) => 19 | Host.CreateDefaultBuilder(args) 20 | .UseWindowsService() 21 | .ConfigureLogging(loggerFactory => loggerFactory.AddEventLog()) 22 | .ConfigureServices(services => 23 | { 24 | services.AddHostedService(); 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WorkerServiceSample/Utils/DocMaker.cs: -------------------------------------------------------------------------------- 1 | using HtmlAgilityPack; 2 | using MariGold.OpenXHTML; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Net; 7 | using System.Text; 8 | 9 | namespace WorkerServiceSample.Utils 10 | { 11 | public class DocMaker 12 | { 13 | public static void MakeDoc(string pageUrl, bool showHtml = false) 14 | { 15 | // Get HTML from website 16 | string htmlContent = string.Empty; 17 | string outputFileName = "_output.docx"; 18 | 19 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(pageUrl); 20 | 21 | using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) 22 | using (Stream stream = response.GetResponseStream()) 23 | using (StreamReader reader = new StreamReader(stream)) 24 | { 25 | htmlContent = reader.ReadToEnd(); 26 | } 27 | outputFileName = request.RequestUri.AbsolutePath.Substring(1); 28 | 29 | if (showHtml) 30 | Console.WriteLine(htmlContent); 31 | 32 | // load HTML content, fix formatting 33 | HtmlDocument htmlDoc = new HtmlDocument(); 34 | htmlDoc.LoadHtml(htmlContent); 35 | //FixImageDimensions(htmlDoc); 36 | 37 | DeleteHtmlContent(htmlDoc, "//footer[@class=\"entry-meta\"]"); 38 | DeleteHtmlContent(htmlDoc, "//div[@id=\"comments\"]"); 39 | DeleteHtmlContent(htmlDoc, "//nav[@class=\"nav-single\"]"); 40 | 41 | string htmlNodeContent = FixCodeFormatting(htmlDoc); 42 | 43 | // Write html node's content to text file. 44 | File.WriteAllText(@"HtmlContent.txt", htmlNodeContent); 45 | 46 | Console.WriteLine("Making your document..."); 47 | Console.WriteLine($"Source: {pageUrl}"); 48 | 49 | // Create DOCX file 50 | WordDocument wordDoc = new WordDocument($"{outputFileName}.docx"); 51 | wordDoc.Process(new HtmlParser(htmlNodeContent)); 52 | wordDoc.Save(); 53 | Console.WriteLine($"Output: {outputFileName}.docx"); 54 | } 55 | 56 | private static void DeleteHtmlContent(HtmlDocument htmlDoc, string nodeSelector) 57 | { 58 | HtmlNode htmlNode = htmlDoc.DocumentNode.SelectSingleNode(nodeSelector); 59 | htmlNode.Remove(); 60 | } 61 | 62 | private static string FixCodeFormatting(HtmlDocument htmlDoc) 63 | { 64 | // look for
 tags which contain code snippets 
 65 |             var preNodes = htmlDoc.DocumentNode.SelectNodes("//pre");
 66 |             foreach (HtmlNode htmlPreNode in preNodes)
 67 |             {
 68 |                 // replace doc's newline with "NEWLINE" placeholder
 69 |                 // ... as HTML tag insertion doesn't seem to work (?)
 70 |                 var replacedText = htmlPreNode.InnerText
 71 |                     .Replace(System.Environment.NewLine, "NEWLINE");
 72 | 
 73 |                 var TextWithFormatting = ""
 74 |                     + replacedText + "";
 75 | 
 76 |                 htmlPreNode.ParentNode.ReplaceChild(
 77 |                     HtmlTextNode.CreateNode(
 78 |                         TextWithFormatting), htmlPreNode);
 79 |             }
 80 |             //
 81 | 
 82 | 
 83 |             HtmlNode htmlNode = htmlDoc.DocumentNode.SelectSingleNode("//*[@id=\"content\"]");
 84 |             string htmlNodeContent = (htmlNode == null) ? "Error, id not found" : htmlNode.InnerHtml;
 85 | 
 86 |             // replace placeholders with actual 
tags 87 | htmlNodeContent = htmlNodeContent.Replace("NEWLINE", "
"); 88 | return htmlNodeContent; 89 | } 90 | 91 | private static void FixImageDimensions(HtmlDocument htmlDoc) 92 | { 93 | // look for tags which contain code snippets 94 | var imgNodes = htmlDoc.DocumentNode.SelectNodes("//img"); 95 | foreach (HtmlNode htmlImgNode in imgNodes) 96 | { 97 | if (htmlImgNode.Attributes["class"] != null) 98 | htmlImgNode.Attributes["class"].Remove(); 99 | 100 | if (htmlImgNode.Attributes["srcset"] != null) 101 | htmlImgNode.Attributes["srcset"].Remove(); 102 | 103 | if (htmlImgNode.Attributes["sizes"] != null) 104 | htmlImgNode.Attributes["sizes"].Remove(); 105 | 106 | if (htmlImgNode.Attributes["width"] != null) 107 | htmlImgNode.Attributes["width"].Remove(); 108 | 109 | if (htmlImgNode.Attributes["height"] != null) 110 | htmlImgNode.Attributes["height"].Remove(); 111 | 112 | //Create new style attribute to set width? 113 | HtmlAttribute styleAttribute = htmlDoc.CreateAttribute("style"); 114 | styleAttribute.Value = "width:100px"; 115 | htmlImgNode.Attributes.Add(styleAttribute); 116 | 117 | } 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /WorkerServiceSample/Worker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | using WorkerServiceSample.Utils; 10 | 11 | namespace WorkerServiceSample 12 | { 13 | public class Worker : BackgroundService 14 | { 15 | private readonly ILogger _logger; 16 | 17 | public Worker(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | protected override async Task ExecuteAsync(CancellationToken stoppingToken) 23 | { 24 | // string array of URLs *without* any trailing slash 25 | string[] articleUrls = { 26 | "https://wakeupandcode.com/authentication-authorization-in-asp-net-core-razor-pages", 27 | "https://wakeupandcode.com/blazor-full-stack-web-dev-in-asp-net-core", 28 | "https://wakeupandcode.com/cookies-and-consent-in-asp-net-core", 29 | "https://wakeupandcode.com/deploying-asp-net-core-to-azure-app-service", 30 | "https://wakeupandcode.com/ef-core-relationships-in-asp-net-core", 31 | "https://wakeupandcode.com/forms-and-fields-in-asp-net-core", 32 | 33 | "https://wakeupandcode.com/generic-host-builder-in-asp-net-core", 34 | "https://wakeupandcode.com/handling-errors-in-asp-net-core", 35 | "https://wakeupandcode.com/iis-hosting-for-asp-net-core-web-apps", 36 | "https://wakeupandcode.com/javascript-css-html-static-files-in-asp-net-core", 37 | "https://wakeupandcode.com/key-vault-for-asp-net-core-web-apps", 38 | "https://wakeupandcode.com/logging-in-asp-net-core", 39 | 40 | "https://wakeupandcode.com/middleware-in-asp-net-core", 41 | "https://wakeupandcode.com/net-core-3-vs2019-and-csharp-8", 42 | "https://wakeupandcode.com/organizational-accounts-for-asp-net-core", 43 | "https://wakeupandcode.com/production-tips-for-asp-net-core-web-apps", 44 | "https://wakeupandcode.com/query-tags-in-ef-core-for-asp-net-core", 45 | "https://wakeupandcode.com/razor-pages-in-asp-net-core", 46 | 47 | "https://wakeupandcode.com/summarizing-build-2019-signalr-service", 48 | "https://wakeupandcode.com/tag-helper-authoring-in-asp-net-core", 49 | "https://wakeupandcode.com/unit-testing-in-asp-net-core", 50 | "https://wakeupandcode.com/validation-in-asp-net-core", 51 | "https://wakeupandcode.com/worker-service-in-asp-net-core", 52 | "https://wakeupandcode.com/xml-json-serialization-in-asp-net-core", 53 | 54 | "https://wakeupandcode.com/yaml-defined-cicd-for-asp-net-core", 55 | "https://wakeupandcode.com/zero-downtime-web-apps-for-asp-net-core" 56 | }; 57 | 58 | 59 | _logger.LogInformation($"Processing {articleUrls.Length} docs at: {DateTimeOffset.Now}"); 60 | for (var articleCounter = 0; articleCounter < articleUrls.Length; articleCounter++) 61 | { 62 | _logger.LogInformation($"Making doc {articleCounter + 1} at: {DateTimeOffset.Now}"); 63 | DocMaker.MakeDoc(articleUrls[articleCounter]); 64 | } 65 | _logger.LogInformation($"Completed {articleUrls.Length} docs at: {DateTimeOffset.Now}"); 66 | 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /WorkerServiceSample/WorkerServiceSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | dotnet-WorkerServiceSample-79A5FE63-05E0-4B2E-8916-39C3C094B411 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WorkerServiceSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WorkerServiceSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/aspnetcore-az-ebook.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/aspnetcore-az-ebook.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/aspnetcore-az-ebook.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/aspnetcore-az-ebook.pdf -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/aspnetcore-az-introduction.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/aspnetcore-az-introduction.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/authentication-authorization-in-asp-net-core-razor-pages.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/authentication-authorization-in-asp-net-core-razor-pages.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/blazor-full-stack-web-dev-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/blazor-full-stack-web-dev-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/cookies-and-consent-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/cookies-and-consent-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/deploying-asp-net-core-to-azure-app-service.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/deploying-asp-net-core-to-azure-app-service.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/ef-core-relationships-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/ef-core-relationships-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/forms-and-fields-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/forms-and-fields-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/generic-host-builder-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/generic-host-builder-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/handling-errors-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/handling-errors-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/iis-hosting-for-asp-net-core-web-apps.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/iis-hosting-for-asp-net-core-web-apps.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/javascript-css-html-static-files-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/javascript-css-html-static-files-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/key-vault-for-asp-net-core-web-apps.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/key-vault-for-asp-net-core-web-apps.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/logging-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/logging-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/middleware-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/middleware-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/net-core-3-vs2019-and-csharp-8.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/net-core-3-vs2019-and-csharp-8.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/organizational-accounts-for-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/organizational-accounts-for-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/production-tips-for-asp-net-core-web-apps.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/production-tips-for-asp-net-core-web-apps.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/query-tags-in-ef-core-for-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/query-tags-in-ef-core-for-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/razor-pages-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/razor-pages-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/summarizing-build-2019-signalr-service.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/summarizing-build-2019-signalr-service.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/tag-helper-authoring-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/tag-helper-authoring-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/unit-testing-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/unit-testing-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/validation-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/validation-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/worker-service-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/worker-service-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/xml-json-serialization-in-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/xml-json-serialization-in-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/yaml-defined-cicd-for-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/yaml-defined-cicd-for-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/chapters/zero-downtime-web-apps-for-asp-net-core.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/chapters/zero-downtime-web-apps-for-asp-net-core.docx -------------------------------------------------------------------------------- /WorkerServiceSample/runtimes/win/lib/netcoreapp2.0/System.Diagnostics.EventLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/runtimes/win/lib/netcoreapp2.0/System.Diagnostics.EventLog.dll -------------------------------------------------------------------------------- /WorkerServiceSample/runtimes/win/lib/netstandard2.0/System.ServiceProcess.ServiceController.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WorkerServiceSample/0e4b072699bc1b42cde59d2eb052aff63c5377b0/WorkerServiceSample/runtimes/win/lib/netstandard2.0/System.ServiceProcess.ServiceController.dll --------------------------------------------------------------------------------